From ee598b180ad2a4acf3fba06f54e991efee94bbc1 Mon Sep 17 00:00:00 2001 From: gitctrlx <76150709+gitctrlx@users.noreply.github.com> Date: Tue, 1 Jul 2025 06:33:09 +0000 Subject: [PATCH] chore(dc_rest): Regen client v"10" on 2025-07-01 --- .github/workflows/python.yml | 34 + .gitignore | 66 + README.md | 923 +- dc_rest/__init__.py | 999 + dc_rest/api/__init__.py | 5 + dc_rest/api/default_api.py | 63438 ++++++++++++++++ dc_rest/api_client.py | 838 + dc_rest/api_response.py | 21 + dc_rest/configuration.py | 656 + dc_rest/exceptions.py | 250 + dc_rest/models/__init__.py | 509 + dc_rest/models/account_response.py | 133 + ...ction_row_component_for_message_request.py | 137 + ...nt_for_message_request_components_inner.py | 227 + .../action_row_component_for_modal_request.py | 137 + .../models/action_row_component_response.py | 143 + ...row_component_response_components_inner.py | 241 + .../models/activities_attachment_response.py | 130 + .../models/add_group_dm_user201_response.py | 171 + dc_rest/models/add_group_dm_user_request.py | 139 + dc_rest/models/add_guild_member_request.py | 162 + dc_rest/models/add_lobby_member_request.py | 144 + .../application_command_attachment_option.py | 142 + ...tion_command_attachment_option_response.py | 155 + ...n_command_autocomplete_callback_request.py | 137 + ...mand_autocomplete_callback_request_data.py | 183 + .../application_command_boolean_option.py | 142 + ...ication_command_boolean_option_response.py | 155 + .../application_command_channel_option.py | 149 + ...ication_command_channel_option_response.py | 162 + .../application_command_create_request.py | 185 + ...on_command_create_request_options_inner.py | 297 + .../application_command_integer_option.py | 168 + ...ication_command_integer_option_response.py | 182 + ...n_command_interaction_metadata_response.py | 183 + .../application_command_mentionable_option.py | 142 + ...ion_command_mentionable_option_response.py | 155 + .../application_command_number_option.py | 178 + ...lication_command_number_option_response.py | 191 + ...plication_command_option_integer_choice.py | 131 + ..._command_option_integer_choice_response.py | 138 + ...pplication_command_option_number_choice.py | 131 + ...n_command_option_number_choice_response.py | 137 + ...pplication_command_option_string_choice.py | 131 + ...n_command_option_string_choice_response.py | 137 + ...plication_command_patch_request_partial.py | 183 + .../models/application_command_permission.py | 138 + .../models/application_command_response.py | 238 + ...lication_command_response_options_inner.py | 297 + .../models/application_command_role_option.py | 142 + ...pplication_command_role_option_response.py | 155 + .../application_command_string_option.py | 178 + ...lication_command_string_option_response.py | 191 + ...ication_command_subcommand_group_option.py | 157 + ...ommand_subcommand_group_option_response.py | 170 + .../application_command_subcommand_option.py | 157 + ...command_subcommand_option_options_inner.py | 269 + ...tion_command_subcommand_option_response.py | 170 + ...ubcommand_option_response_options_inner.py | 269 + .../application_command_update_request.py | 197 + .../models/application_command_user_option.py | 142 + ...pplication_command_user_option_response.py | 155 + dc_rest/models/application_form_partial.py | 234 + .../application_form_partial_description.py | 129 + ..._partial_integration_types_config_value.py | 163 + .../application_incoming_webhook_response.py | 192 + ...lication_integration_type_configuration.py | 135 + ...integration_type_configuration_response.py | 135 + .../application_o_auth2_install_params.py | 139 + ...ication_o_auth2_install_params_response.py | 128 + dc_rest/models/application_response.py | 287 + ..._role_connections_metadata_item_request.py | 137 + ...role_connections_metadata_item_response.py | 136 + ...plication_user_role_connection_response.py | 140 + dc_rest/models/attachment_response.py | 232 + dc_rest/models/audit_log_entry_response.py | 189 + .../audit_log_object_change_response.py | 145 + dc_rest/models/ban_user_from_guild_request.py | 139 + .../base_create_message_create_request.py | 215 + ...message_create_request_components_inner.py | 241 + dc_rest/models/basic_application_response.py | 182 + dc_rest/models/basic_message_response.py | 426 + ...basic_message_response_components_inner.py | 241 + ...c_message_response_interaction_metadata.py | 191 + .../models/basic_message_response_nonce.py | 184 + dc_rest/models/block_message_action.py | 137 + .../models/block_message_action_metadata.py | 132 + .../block_message_action_metadata_response.py | 131 + .../models/block_message_action_response.py | 132 + dc_rest/models/bot_account_patch_request.py | 141 + .../bulk_ban_users_from_guild_request.py | 134 + dc_rest/models/bulk_ban_users_response.py | 129 + .../models/bulk_delete_messages_request.py | 127 + dc_rest/models/bulk_lobby_member_request.py | 160 + ...ulk_update_guild_channels_request_inner.py | 163 + .../bulk_update_guild_roles_request_inner.py | 144 + .../button_component_for_message_request.py | 185 + dc_rest/models/button_component_response.py | 187 + dc_rest/models/channel_follower_response.py | 143 + .../channel_follower_webhook_response.py | 214 + .../channel_permission_overwrite_request.py | 155 + .../channel_permission_overwrite_response.py | 145 + ...el_select_component_for_message_request.py | 179 + .../channel_select_component_response.py | 180 + .../models/channel_select_default_value.py | 141 + .../channel_select_default_value_response.py | 141 + dc_rest/models/command_permission_response.py | 138 + .../models/command_permissions_response.py | 162 + .../component_emoji_for_message_request.py | 139 + dc_rest/models/component_emoji_response.py | 146 + .../connected_account_guild_response.py | 143 + .../connected_account_integration_response.py | 145 + dc_rest/models/connected_account_response.py | 177 + ...container_component_for_message_request.py | 151 + ...nt_for_message_request_components_inner.py | 227 + .../models/container_component_response.py | 147 + ...ner_component_response_components_inner.py | 227 + .../create_application_emoji_request.py | 129 + ...create_auto_moderation_rule200_response.py | 213 + .../create_auto_moderation_rule_request.py | 199 + .../models/create_channel_invite_request.py | 168 + .../models/create_entitlement_request_data.py | 145 + dc_rest/models/create_forum_thread_request.py | 149 + .../models/create_group_dm_invite_request.py | 132 + .../models/create_guild_channel_request.py | 253 + dc_rest/models/create_guild_emoji_request.py | 136 + .../create_guild_from_template_request.py | 134 + dc_rest/models/create_guild_invite_request.py | 184 + .../create_guild_request_channel_item.py | 265 + .../models/create_guild_request_role_item.py | 169 + dc_rest/models/create_guild_role_request.py | 174 + .../create_guild_scheduled_event_request.py | 185 + .../models/create_guild_template_request.py | 134 + .../create_interaction_response_request.py | 228 + dc_rest/models/create_lobby_request.py | 149 + ...te_message_interaction_callback_request.py | 142 + ...e_message_interaction_callback_response.py | 137 + .../models/create_or_join_lobby_request.py | 138 + .../create_or_update_thread_tag_request.py | 153 + .../models/create_private_channel_request.py | 146 + .../models/create_stage_instance_request.py | 157 + ...create_text_thread_with_message_request.py | 136 + ...ate_text_thread_without_message_request.py | 150 + dc_rest/models/create_thread_request.py | 168 + dc_rest/models/create_webhook_request.py | 134 + dc_rest/models/created_thread_response.py | 262 + .../default_keyword_list_trigger_metadata.py | 139 + ..._keyword_list_trigger_metadata_response.py | 128 + .../default_keyword_list_upsert_request.py | 173 + ...yword_list_upsert_request_actions_inner.py | 199 + ...ult_keyword_list_upsert_request_partial.py | 173 + .../models/default_keyword_rule_response.py | 195 + ...ult_keyword_rule_response_actions_inner.py | 199 + .../models/default_reaction_emoji_response.py | 144 + .../models/discord_integration_response.py | 185 + .../models/edit_lobby_channel_link_request.py | 137 + dc_rest/models/embedded_activity_instance.py | 151 + .../embedded_activity_instance_location.py | 177 + dc_rest/models/emoji_response.py | 157 + dc_rest/models/entitlement_response.py | 218 + dc_rest/models/entity_metadata_external.py | 127 + .../entity_metadata_external_response.py | 126 + dc_rest/models/error.py | 128 + dc_rest/models/error_details.py | 176 + dc_rest/models/error_response.py | 134 + dc_rest/models/execute_webhook_request.py | 168 + ...xternal_connection_integration_response.py | 217 + ...external_scheduled_event_create_request.py | 183 + ...l_scheduled_event_patch_request_partial.py | 190 + .../external_scheduled_event_response.py | 261 + .../file_component_for_message_request.py | 139 + dc_rest/models/file_component_response.py | 150 + dc_rest/models/flag_to_channel_action.py | 132 + .../models/flag_to_channel_action_metadata.py | 134 + ...lag_to_channel_action_metadata_response.py | 134 + .../models/flag_to_channel_action_response.py | 132 + dc_rest/models/follow_channel_request.py | 134 + dc_rest/models/forum_tag_response.py | 157 + dc_rest/models/friend_invite_response.py | 212 + dc_rest/models/gateway_bot_response.py | 134 + ...ateway_bot_session_start_limit_response.py | 132 + dc_rest/models/gateway_response.py | 126 + dc_rest/models/get_channel200_response.py | 199 + .../get_entitlements_sku_ids_parameter.py | 178 + dc_rest/models/get_sticker200_response.py | 171 + dc_rest/models/github_author.py | 134 + dc_rest/models/github_check_app.py | 127 + dc_rest/models/github_check_pull_request.py | 126 + dc_rest/models/github_check_run.py | 175 + dc_rest/models/github_check_run_output.py | 139 + dc_rest/models/github_check_suite.py | 162 + dc_rest/models/github_comment.py | 144 + dc_rest/models/github_commit.py | 137 + dc_rest/models/github_discussion.py | 151 + dc_rest/models/github_issue.py | 153 + dc_rest/models/github_release.py | 137 + dc_rest/models/github_repository.py | 133 + dc_rest/models/github_review.py | 142 + dc_rest/models/github_user.py | 133 + dc_rest/models/github_webhook.py | 319 + dc_rest/models/group_dm_invite_response.py | 184 + dc_rest/models/guild_audit_log_response.py | 204 + ...d_audit_log_response_integrations_inner.py | 185 + dc_rest/models/guild_ban_response.py | 137 + dc_rest/models/guild_channel_location.py | 147 + dc_rest/models/guild_channel_response.py | 309 + dc_rest/models/guild_create_request.py | 224 + .../models/guild_home_settings_response.py | 177 + .../models/guild_incoming_webhook_response.py | 206 + dc_rest/models/guild_invite_response.py | 296 + dc_rest/models/guild_member_response.py | 190 + dc_rest/models/guild_mfa_level_response.py | 126 + dc_rest/models/guild_onboarding_response.py | 148 + dc_rest/models/guild_patch_request_partial.py | 284 + dc_rest/models/guild_preview_response.py | 197 + .../models/guild_product_purchase_response.py | 136 + dc_rest/models/guild_prune_response.py | 131 + dc_rest/models/guild_response.py | 376 + dc_rest/models/guild_role_response.py | 180 + dc_rest/models/guild_role_tags_response.py | 182 + dc_rest/models/guild_sticker_response.py | 176 + ...guild_subscription_integration_response.py | 166 + .../models/guild_template_channel_response.py | 237 + dc_rest/models/guild_template_channel_tags.py | 153 + dc_rest/models/guild_template_response.py | 185 + .../models/guild_template_role_response.py | 150 + .../guild_template_snapshot_response.py | 202 + dc_rest/models/guild_welcome_channel.py | 155 + .../guild_welcome_screen_channel_response.py | 155 + .../models/guild_welcome_screen_response.py | 141 + dc_rest/models/guild_with_counts_response.py | 390 + .../incoming_webhook_interaction_request.py | 213 + .../incoming_webhook_request_partial.py | 241 + ...or_interaction_callback_request_partial.py | 195 + ...incoming_webhook_update_request_partial.py | 206 + dc_rest/models/inner_errors.py | 134 + .../integration_application_response.py | 182 + ...mand_autocomplete_callback_integer_data.py | 140 + ...mmand_autocomplete_callback_number_data.py | 140 + ...mmand_autocomplete_callback_string_data.py | 140 + .../models/interaction_callback_response.py | 141 + .../interaction_callback_response_resource.py | 191 + dc_rest/models/interaction_response.py | 186 + dc_rest/models/invite_application_response.py | 287 + .../invite_channel_recipient_response.py | 126 + dc_rest/models/invite_channel_response.py | 165 + dc_rest/models/invite_guild_response.py | 196 + dc_rest/models/keyword_rule_response.py | 195 + dc_rest/models/keyword_trigger_metadata.py | 146 + .../keyword_trigger_metadata_response.py | 130 + dc_rest/models/keyword_upsert_request.py | 178 + .../models/keyword_upsert_request_partial.py | 178 + ...h_activity_interaction_callback_request.py | 131 + ..._activity_interaction_callback_response.py | 131 + .../list_application_emojis_response.py | 134 + ...auto_moderation_rules200_response_inner.py | 219 + .../list_channel_invites200_response_inner.py | 183 + ...list_channel_webhooks200_response_inner.py | 185 + ...st_guild_integrations200_response_inner.py | 185 + ...uild_scheduled_events200_response_inner.py | 185 + .../list_guild_soundboard_sounds_response.py | 134 + dc_rest/models/lobby_member_request.py | 153 + dc_rest/models/lobby_member_response.py | 138 + dc_rest/models/lobby_message_response.py | 178 + dc_rest/models/lobby_response.py | 171 + ...a_gallery_component_for_message_request.py | 137 + .../media_gallery_component_response.py | 138 + dc_rest/models/media_gallery_item_request.py | 145 + dc_rest/models/media_gallery_item_response.py | 139 + dc_rest/models/mention_spam_rule_response.py | 195 + .../models/mention_spam_trigger_metadata.py | 134 + .../mention_spam_trigger_metadata_response.py | 133 + dc_rest/models/mention_spam_upsert_request.py | 178 + .../mention_spam_upsert_request_partial.py | 178 + ...le_select_component_for_message_request.py | 172 + ...or_message_request_default_values_inner.py | 171 + .../mentionable_select_component_response.py | 173 + ...component_response_default_values_inner.py | 171 + .../message_allowed_mentions_request.py | 153 + dc_rest/models/message_attachment_request.py | 176 + dc_rest/models/message_attachment_response.py | 232 + dc_rest/models/message_call_response.py | 135 + ...component_interaction_metadata_response.py | 170 + dc_rest/models/message_create_request.py | 251 + .../models/message_edit_request_partial.py | 202 + .../models/message_embed_author_response.py | 147 + .../models/message_embed_field_response.py | 130 + .../models/message_embed_footer_response.py | 140 + .../models/message_embed_image_response.py | 168 + .../models/message_embed_provider_response.py | 133 + dc_rest/models/message_embed_response.py | 242 + .../models/message_embed_video_response.py | 168 + .../models/message_interaction_response.py | 156 + .../message_mention_channel_response.py | 147 + ...message_reaction_count_details_response.py | 128 + .../models/message_reaction_emoji_response.py | 151 + dc_rest/models/message_reaction_response.py | 144 + dc_rest/models/message_reference_request.py | 172 + dc_rest/models/message_reference_response.py | 165 + dc_rest/models/message_response.py | 452 + ...message_role_subscription_data_response.py | 140 + dc_rest/models/message_snapshot_response.py | 135 + .../models/message_sticker_item_response.py | 143 + .../minimal_content_message_response.py | 224 + dc_rest/models/ml_spam_rule_response.py | 191 + dc_rest/models/ml_spam_upsert_request.py | 169 + .../models/ml_spam_upsert_request_partial.py | 169 + .../modal_interaction_callback_request.py | 137 + ...modal_interaction_callback_request_data.py | 139 + ...al_submit_interaction_metadata_response.py | 167 + ...esponse_triggering_interaction_metadata.py | 171 + dc_rest/models/my_guild_response.py | 170 + dc_rest/models/new_member_action_response.py | 163 + .../o_auth2_get_authorization_response.py | 146 + dc_rest/models/o_auth2_get_keys.py | 134 + ..._get_open_id_connect_user_info_response.py | 168 + dc_rest/models/o_auth2_key.py | 136 + .../onboarding_prompt_option_request.py | 186 + .../onboarding_prompt_option_response.py | 148 + dc_rest/models/onboarding_prompt_response.py | 154 + .../partial_discord_integration_response.py | 168 + ...xternal_connection_integration_response.py | 159 + ...guild_subscription_integration_response.py | 159 + ...sdk_unmerge_provisional_account_request.py | 150 + dc_rest/models/pinned_message_response.py | 133 + dc_rest/models/pinned_messages_response.py | 141 + dc_rest/models/poll_answer_create_request.py | 130 + .../models/poll_answer_details_response.py | 139 + dc_rest/models/poll_answer_response.py | 132 + dc_rest/models/poll_create_request.py | 157 + dc_rest/models/poll_emoji.py | 151 + dc_rest/models/poll_emoji_create_request.py | 151 + dc_rest/models/poll_media.py | 143 + dc_rest/models/poll_media_create_request.py | 143 + dc_rest/models/poll_media_response.py | 142 + dc_rest/models/poll_response.py | 153 + dc_rest/models/poll_results_entry_response.py | 135 + dc_rest/models/poll_results_response.py | 141 + .../pong_interaction_callback_request.py | 131 + .../models/private_application_response.py | 332 + dc_rest/models/private_channel_location.py | 138 + dc_rest/models/private_channel_response.py | 168 + .../models/private_group_channel_response.py | 213 + .../models/private_guild_member_response.py | 190 + dc_rest/models/provisional_token_response.py | 155 + dc_rest/models/prune_guild_request.py | 150 + .../prune_guild_request_include_roles.py | 184 + .../models/purchase_notification_response.py | 142 + dc_rest/models/quarantine_user_action.py | 128 + .../models/quarantine_user_action_response.py | 128 + dc_rest/models/resolved_objects_response.py | 184 + dc_rest/models/resource_channel_response.py | 156 + dc_rest/models/rich_embed.py | 249 + dc_rest/models/rich_embed_author.py | 146 + dc_rest/models/rich_embed_field.py | 136 + dc_rest/models/rich_embed_footer.py | 139 + dc_rest/models/rich_embed_image.py | 174 + dc_rest/models/rich_embed_provider.py | 139 + dc_rest/models/rich_embed_thumbnail.py | 174 + dc_rest/models/rich_embed_video.py | 174 + ...le_select_component_for_message_request.py | 172 + .../models/role_select_component_response.py | 173 + dc_rest/models/role_select_default_value.py | 141 + .../role_select_default_value_response.py | 141 + dc_rest/models/scheduled_event_response.py | 255 + .../models/scheduled_event_user_response.py | 165 + dc_rest/models/sdk_message_request.py | 251 + .../section_component_for_message_request.py | 143 + ...component_for_message_request_accessory.py | 171 + dc_rest/models/section_component_response.py | 144 + .../section_component_response_accessory.py | 171 + ...separator_component_for_message_request.py | 135 + .../models/separator_component_response.py | 132 + ...et_channel_permission_overwrite_request.py | 145 + ...application_command_permissions_request.py | 140 + dc_rest/models/set_guild_mfa_level_request.py | 126 + dc_rest/models/settings_emoji_response.py | 151 + dc_rest/models/slack_webhook.py | 161 + dc_rest/models/soundboard_create_request.py | 155 + .../soundboard_patch_request_partial.py | 153 + dc_rest/models/soundboard_sound_response.py | 182 + .../models/soundboard_sound_send_request.py | 146 + dc_rest/models/spam_link_rule_response.py | 191 + dc_rest/models/stage_instance_response.py | 175 + .../stage_scheduled_event_create_request.py | 179 + ...e_scheduled_event_patch_request_partial.py | 186 + .../models/stage_scheduled_event_response.py | 257 + dc_rest/models/standard_sticker_response.py | 165 + .../sticker_pack_collection_response.py | 134 + dc_rest/models/sticker_pack_response.py | 186 + ...ng_select_component_for_message_request.py | 167 + .../string_select_component_response.py | 168 + ...tring_select_option_for_message_request.py | 154 + .../models/string_select_option_response.py | 153 + dc_rest/models/team_member_response.py | 142 + dc_rest/models/team_response.py | 162 + ...t_display_component_for_message_request.py | 129 + .../models/text_display_component_response.py | 130 + .../text_input_component_for_modal_request.py | 168 + .../models/text_input_component_response.py | 174 + dc_rest/models/thread_member_response.py | 159 + dc_rest/models/thread_metadata_response.py | 152 + dc_rest/models/thread_response.py | 262 + dc_rest/models/thread_search_response.py | 173 + dc_rest/models/thread_search_tag_parameter.py | 178 + dc_rest/models/threads_response.py | 166 + ...thumbnail_component_for_message_request.py | 147 + .../models/thumbnail_component_response.py | 143 + dc_rest/models/unfurled_media_request.py | 127 + ...uest_with_attachment_reference_required.py | 127 + dc_rest/models/unfurled_media_response.py | 171 + .../update_application_emoji_request.py | 127 + ...pplication_user_role_connection_request.py | 141 + .../update_auto_moderation_rule_request.py | 198 + dc_rest/models/update_channel_request.py | 198 + .../update_default_reaction_emoji_request.py | 144 + dc_rest/models/update_dm_request_partial.py | 132 + .../models/update_group_dm_request_partial.py | 139 + .../update_guild_channel_request_partial.py | 260 + dc_rest/models/update_guild_emoji_request.py | 134 + dc_rest/models/update_guild_member_request.py | 180 + .../models/update_guild_onboarding_request.py | 156 + .../update_guild_scheduled_event_request.py | 183 + .../models/update_guild_sticker_request.py | 136 + .../models/update_guild_template_request.py | 134 + .../update_guild_widget_settings_request.py | 144 + ...te_message_interaction_callback_request.py | 142 + ...e_message_interaction_callback_response.py | 137 + .../models/update_my_guild_member_request.py | 132 + .../update_onboarding_prompt_request.py | 169 + .../models/update_self_voice_state_request.py | 152 + .../models/update_stage_instance_request.py | 129 + .../models/update_thread_request_partial.py | 199 + dc_rest/models/update_thread_tag_request.py | 165 + dc_rest/models/update_voice_state_request.py | 144 + .../models/update_webhook_by_token_request.py | 134 + dc_rest/models/update_webhook_request.py | 146 + .../models/user_avatar_decoration_response.py | 139 + dc_rest/models/user_collectibles_response.py | 135 + .../user_communication_disabled_action.py | 132 + ..._communication_disabled_action_metadata.py | 132 + ...ation_disabled_action_metadata_response.py | 126 + ..._communication_disabled_action_response.py | 132 + .../models/user_guild_onboarding_response.py | 148 + dc_rest/models/user_nameplate_response.py | 153 + dc_rest/models/user_pii_response.py | 237 + dc_rest/models/user_primary_guild_response.py | 158 + dc_rest/models/user_response.py | 217 + ...er_select_component_for_message_request.py | 172 + .../models/user_select_component_response.py | 173 + dc_rest/models/user_select_default_value.py | 141 + .../user_select_default_value_response.py | 141 + dc_rest/models/vanity_url_error_response.py | 128 + dc_rest/models/vanity_url_response.py | 144 + dc_rest/models/voice_region_response.py | 134 + .../voice_scheduled_event_create_request.py | 179 + ...e_scheduled_event_patch_request_partial.py | 186 + .../models/voice_scheduled_event_response.py | 257 + dc_rest/models/voice_state_response.py | 198 + dc_rest/models/webhook_slack_embed.py | 241 + dc_rest/models/webhook_slack_embed_field.py | 146 + .../models/webhook_source_channel_response.py | 136 + .../models/webhook_source_guild_response.py | 143 + dc_rest/models/welcome_message_response.py | 129 + .../welcome_screen_patch_request_partial.py | 154 + dc_rest/models/widget_activity.py | 126 + dc_rest/models/widget_channel.py | 138 + dc_rest/models/widget_member.py | 205 + dc_rest/models/widget_response.py | 165 + dc_rest/models/widget_settings_response.py | 139 + dc_rest/py.typed | 0 dc_rest/rest.py | 247 + docs/AccountResponse.md | 30 + docs/ActionRowComponentForMessageRequest.md | 30 + ...mponentForMessageRequestComponentsInner.md | 42 + docs/ActionRowComponentForModalRequest.md | 30 + docs/ActionRowComponentResponse.md | 31 + ...tionRowComponentResponseComponentsInner.md | 47 + docs/ActivitiesAttachmentResponse.md | 29 + docs/AddGroupDmUser201Response.md | 39 + docs/AddGroupDmUserRequest.md | 30 + docs/AddGuildMemberRequest.md | 34 + docs/AddLobbyMemberRequest.md | 30 + docs/ApplicationCommandAttachmentOption.md | 34 + ...licationCommandAttachmentOptionResponse.md | 36 + ...ationCommandAutocompleteCallbackRequest.md | 30 + ...nCommandAutocompleteCallbackRequestData.md | 29 + docs/ApplicationCommandBooleanOption.md | 34 + ...ApplicationCommandBooleanOptionResponse.md | 36 + docs/ApplicationCommandChannelOption.md | 35 + ...ApplicationCommandChannelOptionResponse.md | 37 + docs/ApplicationCommandCreateRequest.md | 39 + ...icationCommandCreateRequestOptionsInner.md | 42 + docs/ApplicationCommandIntegerOption.md | 38 + ...ApplicationCommandIntegerOptionResponse.md | 40 + ...ationCommandInteractionMetadataResponse.md | 35 + docs/ApplicationCommandMentionableOption.md | 34 + ...icationCommandMentionableOptionResponse.md | 36 + docs/ApplicationCommandNumberOption.md | 38 + .../ApplicationCommandNumberOptionResponse.md | 40 + docs/ApplicationCommandOptionIntegerChoice.md | 31 + ...ationCommandOptionIntegerChoiceResponse.md | 32 + docs/ApplicationCommandOptionNumberChoice.md | 31 + ...cationCommandOptionNumberChoiceResponse.md | 32 + docs/ApplicationCommandOptionStringChoice.md | 31 + ...cationCommandOptionStringChoiceResponse.md | 32 + docs/ApplicationCommandPatchRequestPartial.md | 38 + docs/ApplicationCommandPermission.md | 31 + docs/ApplicationCommandResponse.md | 45 + .../ApplicationCommandResponseOptionsInner.md | 44 + docs/ApplicationCommandRoleOption.md | 34 + docs/ApplicationCommandRoleOptionResponse.md | 36 + docs/ApplicationCommandStringOption.md | 38 + .../ApplicationCommandStringOptionResponse.md | 40 + ...ApplicationCommandSubcommandGroupOption.md | 35 + ...ionCommandSubcommandGroupOptionResponse.md | 37 + docs/ApplicationCommandSubcommandOption.md | 35 + ...tionCommandSubcommandOptionOptionsInner.md | 41 + ...licationCommandSubcommandOptionResponse.md | 37 + ...andSubcommandOptionResponseOptionsInner.md | 43 + docs/ApplicationCommandUpdateRequest.md | 40 + docs/ApplicationCommandUserOption.md | 34 + docs/ApplicationCommandUserOptionResponse.md | 36 + docs/ApplicationFormPartial.md | 42 + docs/ApplicationFormPartialDescription.md | 30 + ...nFormPartialIntegrationTypesConfigValue.md | 29 + docs/ApplicationIncomingWebhookResponse.md | 36 + ...ApplicationIntegrationTypeConfiguration.md | 29 + ...ionIntegrationTypeConfigurationResponse.md | 29 + docs/ApplicationOAuth2InstallParams.md | 30 + .../ApplicationOAuth2InstallParamsResponse.md | 30 + docs/ApplicationResponse.md | 50 + ...ationRoleConnectionsMetadataItemRequest.md | 34 + ...tionRoleConnectionsMetadataItemResponse.md | 34 + docs/ApplicationUserRoleConnectionResponse.md | 31 + docs/AttachmentResponse.md | 44 + docs/AuditLogEntryResponse.md | 35 + docs/AuditLogObjectChangeResponse.md | 31 + docs/BanUserFromGuildRequest.md | 30 + docs/BaseCreateMessageCreateRequest.md | 37 + ...eateMessageCreateRequestComponentsInner.md | 38 + docs/BasicApplicationResponse.md | 36 + docs/BasicMessageResponse.md | 63 + docs/BasicMessageResponseComponentsInner.md | 41 + ...BasicMessageResponseInteractionMetadata.md | 37 + docs/BasicMessageResponseNonce.md | 28 + docs/BlockMessageAction.md | 30 + docs/BlockMessageActionMetadata.md | 29 + docs/BlockMessageActionMetadataResponse.md | 29 + docs/BlockMessageActionResponse.md | 30 + docs/BotAccountPatchRequest.md | 31 + docs/BulkBanUsersFromGuildRequest.md | 30 + docs/BulkBanUsersResponse.md | 30 + docs/BulkDeleteMessagesRequest.md | 29 + docs/BulkLobbyMemberRequest.md | 32 + docs/BulkUpdateGuildChannelsRequestInner.md | 32 + docs/BulkUpdateGuildRolesRequestInner.md | 30 + docs/ButtonComponentForMessageRequest.md | 36 + docs/ButtonComponentResponse.md | 37 + docs/ChannelFollowerResponse.md | 30 + docs/ChannelFollowerWebhookResponse.md | 38 + docs/ChannelPermissionOverwriteRequest.md | 32 + docs/ChannelPermissionOverwriteResponse.md | 32 + ...ChannelSelectComponentForMessageRequest.md | 36 + docs/ChannelSelectComponentResponse.md | 37 + docs/ChannelSelectDefaultValue.md | 30 + docs/ChannelSelectDefaultValueResponse.md | 30 + docs/CommandPermissionResponse.md | 31 + docs/CommandPermissionsResponse.md | 32 + docs/ComponentEmojiForMessageRequest.md | 30 + docs/ComponentEmojiResponse.md | 31 + docs/ConnectedAccountGuildResponse.md | 31 + docs/ConnectedAccountIntegrationResponse.md | 32 + docs/ConnectedAccountResponse.md | 38 + docs/ContainerComponentForMessageRequest.md | 32 + ...mponentForMessageRequestComponentsInner.md | 37 + docs/ContainerComponentResponse.md | 33 + ...ntainerComponentResponseComponentsInner.md | 40 + docs/CreateApplicationEmojiRequest.md | 30 + docs/CreateAutoModerationRule200Response.md | 39 + docs/CreateAutoModerationRuleRequest.md | 36 + docs/CreateChannelInviteRequest.md | 35 + docs/CreateEntitlementRequestData.md | 31 + docs/CreateForumThreadRequest.md | 33 + docs/CreateGroupDMInviteRequest.md | 29 + docs/CreateGuildChannelRequest.md | 47 + docs/CreateGuildEmojiRequest.md | 31 + docs/CreateGuildFromTemplateRequest.md | 30 + docs/CreateGuildInviteRequest.md | 35 + docs/CreateGuildRequestChannelItem.md | 48 + docs/CreateGuildRequestRoleItem.md | 35 + docs/CreateGuildRoleRequest.md | 35 + docs/CreateGuildScheduledEventRequest.md | 37 + docs/CreateGuildTemplateRequest.md | 30 + docs/CreateInteractionResponseRequest.md | 30 + docs/CreateLobbyRequest.md | 31 + ...CreateMessageInteractionCallbackRequest.md | 30 + ...reateMessageInteractionCallbackResponse.md | 30 + docs/CreateOrJoinLobbyRequest.md | 32 + docs/CreateOrUpdateThreadTagRequest.md | 32 + docs/CreatePrivateChannelRequest.md | 31 + docs/CreateStageInstanceRequest.md | 33 + docs/CreateTextThreadWithMessageRequest.md | 31 + docs/CreateTextThreadWithoutMessageRequest.md | 33 + docs/CreateThreadRequest.md | 35 + docs/CreateWebhookRequest.md | 30 + docs/CreatedThreadResponse.md | 49 + docs/DefaultApi.md | 17593 +++++ docs/DefaultKeywordListTriggerMetadata.md | 30 + ...faultKeywordListTriggerMetadataResponse.md | 30 + docs/DefaultKeywordListUpsertRequest.md | 36 + ...ultKeywordListUpsertRequestActionsInner.md | 30 + .../DefaultKeywordListUpsertRequestPartial.md | 36 + docs/DefaultKeywordRuleResponse.md | 39 + .../DefaultKeywordRuleResponseActionsInner.md | 30 + docs/DefaultReactionEmojiResponse.md | 30 + docs/DiscordIntegrationResponse.md | 36 + docs/EditLobbyChannelLinkRequest.md | 29 + docs/EmbeddedActivityInstance.md | 33 + docs/EmbeddedActivityInstanceLocation.md | 32 + docs/EmojiResponse.md | 36 + docs/EntitlementResponse.md | 40 + docs/EntityMetadataExternal.md | 29 + docs/EntityMetadataExternalResponse.md | 29 + docs/Error.md | 31 + docs/ErrorDetails.md | 29 + docs/ErrorResponse.md | 32 + docs/ExecuteWebhookRequest.md | 40 + docs/ExternalConnectionIntegrationResponse.md | 42 + docs/ExternalScheduledEventCreateRequest.md | 37 + ...ternalScheduledEventPatchRequestPartial.md | 38 + docs/ExternalScheduledEventResponse.md | 45 + docs/FileComponentForMessageRequest.md | 31 + docs/FileComponentResponse.md | 34 + docs/FlagToChannelAction.md | 30 + docs/FlagToChannelActionMetadata.md | 29 + docs/FlagToChannelActionMetadataResponse.md | 29 + docs/FlagToChannelActionResponse.md | 30 + docs/FollowChannelRequest.md | 29 + docs/ForumTagResponse.md | 33 + docs/FriendInviteResponse.md | 40 + docs/GatewayBotResponse.md | 31 + docs/GatewayBotSessionStartLimitResponse.md | 32 + docs/GatewayResponse.md | 29 + docs/GetChannel200Response.md | 66 + docs/GetEntitlementsSkuIdsParameter.md | 28 + docs/GetSticker200Response.md | 39 + docs/GithubAuthor.md | 30 + docs/GithubCheckApp.md | 29 + docs/GithubCheckPullRequest.md | 29 + docs/GithubCheckRun.md | 35 + docs/GithubCheckRunOutput.md | 30 + docs/GithubCheckSuite.md | 33 + docs/GithubComment.md | 33 + docs/GithubCommit.md | 32 + docs/GithubDiscussion.md | 34 + docs/GithubIssue.md | 35 + docs/GithubRelease.md | 32 + docs/GithubRepository.md | 32 + docs/GithubReview.md | 32 + docs/GithubUser.md | 32 + docs/GithubWebhook.md | 48 + docs/GroupDMInviteResponse.md | 36 + docs/GuildAuditLogResponse.md | 36 + .../GuildAuditLogResponseIntegrationsInner.md | 33 + docs/GuildBanResponse.md | 30 + docs/GuildChannelLocation.md | 32 + docs/GuildChannelResponse.md | 55 + docs/GuildCreateRequest.md | 42 + docs/GuildHomeSettingsResponse.md | 33 + docs/GuildIncomingWebhookResponse.md | 38 + docs/GuildInviteResponse.md | 49 + docs/GuildMFALevelResponse.md | 29 + docs/GuildMemberResponse.md | 41 + docs/GuildOnboardingResponse.md | 32 + docs/GuildPatchRequestPartial.md | 50 + docs/GuildPreviewResponse.md | 40 + docs/GuildProductPurchaseResponse.md | 30 + docs/GuildPruneResponse.md | 29 + docs/GuildResponse.md | 67 + docs/GuildRoleResponse.md | 40 + docs/GuildRoleTagsResponse.md | 34 + docs/GuildStickerResponse.md | 37 + docs/GuildSubscriptionIntegrationResponse.md | 33 + docs/GuildTemplateChannelResponse.md | 49 + docs/GuildTemplateChannelTags.md | 32 + docs/GuildTemplateResponse.md | 39 + docs/GuildTemplateRoleResponse.md | 36 + docs/GuildTemplateSnapshotResponse.md | 41 + docs/GuildWelcomeChannel.md | 32 + docs/GuildWelcomeScreenChannelResponse.md | 32 + docs/GuildWelcomeScreenResponse.md | 30 + docs/GuildWithCountsResponse.md | 69 + docs/IncomingWebhookInteractionRequest.md | 36 + docs/IncomingWebhookRequestPartial.md | 40 + ...ateForInteractionCallbackRequestPartial.md | 34 + docs/IncomingWebhookUpdateRequestPartial.md | 35 + docs/InnerErrors.md | 29 + docs/IntegrationApplicationResponse.md | 36 + ...nCommandAutocompleteCallbackIntegerData.md | 29 + ...onCommandAutocompleteCallbackNumberData.md | 29 + ...onCommandAutocompleteCallbackStringData.md | 29 + docs/InteractionCallbackResponse.md | 30 + docs/InteractionCallbackResponseResource.md | 30 + docs/InteractionResponse.md | 35 + docs/InviteApplicationResponse.md | 50 + docs/InviteChannelRecipientResponse.md | 29 + docs/InviteChannelResponse.md | 33 + docs/InviteGuildResponse.md | 40 + docs/KeywordRuleResponse.md | 39 + docs/KeywordTriggerMetadata.md | 31 + docs/KeywordTriggerMetadataResponse.md | 31 + docs/KeywordUpsertRequest.md | 36 + docs/KeywordUpsertRequestPartial.md | 36 + ...aunchActivityInteractionCallbackRequest.md | 29 + ...unchActivityInteractionCallbackResponse.md | 29 + docs/ListApplicationEmojisResponse.md | 29 + ...ListAutoModerationRules200ResponseInner.md | 39 + docs/ListChannelInvites200ResponseInner.md | 50 + docs/ListChannelWebhooks200ResponseInner.md | 40 + docs/ListGuildIntegrations200ResponseInner.md | 44 + ...istGuildScheduledEvents200ResponseInner.md | 45 + docs/ListGuildSoundboardSoundsResponse.md | 29 + docs/LobbyMemberRequest.md | 31 + docs/LobbyMemberResponse.md | 31 + docs/LobbyMessageResponse.md | 37 + docs/LobbyResponse.md | 33 + docs/MLSpamRuleResponse.md | 39 + docs/MLSpamUpsertRequest.md | 36 + docs/MLSpamUpsertRequestPartial.md | 36 + .../MediaGalleryComponentForMessageRequest.md | 30 + docs/MediaGalleryComponentResponse.md | 31 + docs/MediaGalleryItemRequest.md | 31 + docs/MediaGalleryItemResponse.md | 31 + docs/MentionSpamRuleResponse.md | 39 + docs/MentionSpamTriggerMetadata.md | 30 + docs/MentionSpamTriggerMetadataResponse.md | 30 + docs/MentionSpamUpsertRequest.md | 36 + docs/MentionSpamUpsertRequestPartial.md | 36 + ...ionableSelectComponentForMessageRequest.md | 35 + ...nentForMessageRequestDefaultValuesInner.md | 30 + docs/MentionableSelectComponentResponse.md | 36 + ...lectComponentResponseDefaultValuesInner.md | 30 + docs/MessageAllowedMentionsRequest.md | 32 + docs/MessageAttachmentRequest.md | 35 + docs/MessageAttachmentResponse.md | 44 + docs/MessageCallResponse.md | 30 + ...ageComponentInteractionMetadataResponse.md | 34 + docs/MessageCreateRequest.md | 41 + docs/MessageEditRequestPartial.md | 35 + docs/MessageEmbedAuthorResponse.md | 32 + docs/MessageEmbedFieldResponse.md | 31 + docs/MessageEmbedFooterResponse.md | 31 + docs/MessageEmbedImageResponse.md | 37 + docs/MessageEmbedProviderResponse.md | 30 + docs/MessageEmbedResponse.md | 41 + docs/MessageEmbedVideoResponse.md | 37 + docs/MessageInteractionResponse.md | 33 + docs/MessageMentionChannelResponse.md | 32 + docs/MessageReactionCountDetailsResponse.md | 30 + docs/MessageReactionEmojiResponse.md | 31 + docs/MessageReactionResponse.md | 34 + docs/MessageReferenceRequest.md | 33 + docs/MessageReferenceResponse.md | 32 + docs/MessageResponse.md | 65 + docs/MessageRoleSubscriptionDataResponse.md | 32 + docs/MessageSnapshotResponse.md | 29 + docs/MessageStickerItemResponse.md | 31 + docs/MinimalContentMessageResponse.md | 41 + docs/ModalInteractionCallbackRequest.md | 30 + docs/ModalInteractionCallbackRequestData.md | 31 + .../ModalSubmitInteractionMetadataResponse.md | 34 + ...taResponseTriggeringInteractionMetadata.md | 36 + docs/MyGuildResponse.md | 37 + docs/NewMemberActionResponse.md | 34 + docs/OAuth2GetAuthorizationResponse.md | 32 + docs/OAuth2GetKeys.md | 29 + .../OAuth2GetOpenIDConnectUserInfoResponse.md | 35 + docs/OAuth2Key.md | 34 + docs/OnboardingPromptOptionRequest.md | 36 + docs/OnboardingPromptOptionResponse.md | 34 + docs/OnboardingPromptResponse.md | 35 + docs/PartialDiscordIntegrationResponse.md | 33 + ...alExternalConnectionIntegrationResponse.md | 32 + ...ialGuildSubscriptionIntegrationResponse.md | 32 + ...tnerSdkUnmergeProvisionalAccountRequest.md | 32 + docs/PinnedMessageResponse.md | 30 + docs/PinnedMessagesResponse.md | 30 + docs/PollAnswerCreateRequest.md | 29 + docs/PollAnswerDetailsResponse.md | 29 + docs/PollAnswerResponse.md | 30 + docs/PollCreateRequest.md | 33 + docs/PollEmoji.md | 31 + docs/PollEmojiCreateRequest.md | 31 + docs/PollMedia.md | 30 + docs/PollMediaCreateRequest.md | 30 + docs/PollMediaResponse.md | 30 + docs/PollResponse.md | 34 + docs/PollResultsEntryResponse.md | 31 + docs/PollResultsResponse.md | 30 + docs/PongInteractionCallbackRequest.md | 29 + docs/PrivateApplicationResponse.md | 59 + docs/PrivateChannelLocation.md | 31 + docs/PrivateChannelResponse.md | 34 + docs/PrivateGroupChannelResponse.md | 39 + docs/PrivateGuildMemberResponse.md | 41 + docs/ProvisionalTokenResponse.md | 36 + docs/PruneGuildRequest.md | 31 + docs/PruneGuildRequestIncludeRoles.md | 28 + docs/PurchaseNotificationResponse.md | 30 + docs/QuarantineUserAction.md | 30 + docs/QuarantineUserActionResponse.md | 30 + docs/ResolvedObjectsResponse.md | 32 + docs/ResourceChannelResponse.md | 33 + docs/RichEmbed.md | 41 + docs/RichEmbedAuthor.md | 31 + docs/RichEmbedField.md | 31 + docs/RichEmbedFooter.md | 30 + docs/RichEmbedImage.md | 35 + docs/RichEmbedProvider.md | 30 + docs/RichEmbedThumbnail.md | 35 + docs/RichEmbedVideo.md | 35 + docs/RoleSelectComponentForMessageRequest.md | 35 + docs/RoleSelectComponentResponse.md | 36 + docs/RoleSelectDefaultValue.md | 30 + docs/RoleSelectDefaultValueResponse.md | 30 + docs/SDKMessageRequest.md | 41 + docs/ScheduledEventResponse.md | 44 + docs/ScheduledEventUserResponse.md | 32 + docs/SectionComponentForMessageRequest.md | 31 + ...tionComponentForMessageRequestAccessory.md | 39 + docs/SectionComponentResponse.md | 32 + docs/SectionComponentResponseAccessory.md | 40 + docs/SeparatorComponentForMessageRequest.md | 31 + docs/SeparatorComponentResponse.md | 32 + docs/SetChannelPermissionOverwriteRequest.md | 31 + ...ildApplicationCommandPermissionsRequest.md | 29 + docs/SetGuildMfaLevelRequest.md | 29 + docs/SettingsEmojiResponse.md | 31 + docs/SlackWebhook.md | 32 + docs/SoundboardCreateRequest.md | 33 + docs/SoundboardPatchRequestPartial.md | 32 + docs/SoundboardSoundResponse.md | 36 + docs/SoundboardSoundSendRequest.md | 30 + docs/SpamLinkRuleResponse.md | 39 + docs/StageInstanceResponse.md | 35 + docs/StageScheduledEventCreateRequest.md | 37 + .../StageScheduledEventPatchRequestPartial.md | 38 + docs/StageScheduledEventResponse.md | 45 + docs/StandardStickerResponse.md | 36 + docs/StickerPackCollectionResponse.md | 29 + docs/StickerPackResponse.md | 35 + .../StringSelectComponentForMessageRequest.md | 35 + docs/StringSelectComponentResponse.md | 36 + docs/StringSelectOptionForMessageRequest.md | 33 + docs/StringSelectOptionResponse.md | 33 + docs/TeamMemberResponse.md | 31 + docs/TeamResponse.md | 33 + docs/TextDisplayComponentForMessageRequest.md | 30 + docs/TextDisplayComponentResponse.md | 31 + docs/TextInputComponentForModalRequest.md | 37 + docs/TextInputComponentResponse.md | 38 + docs/ThreadMemberResponse.md | 33 + docs/ThreadMetadataResponse.md | 34 + docs/ThreadResponse.md | 49 + docs/ThreadSearchResponse.md | 33 + docs/ThreadSearchTagParameter.md | 28 + docs/ThreadsResponse.md | 32 + docs/ThumbnailComponentForMessageRequest.md | 32 + docs/ThumbnailComponentResponse.md | 33 + docs/UnfurledMediaRequest.md | 29 + ...aRequestWithAttachmentReferenceRequired.md | 29 + docs/UnfurledMediaResponse.md | 35 + docs/UpdateApplicationEmojiRequest.md | 29 + ...ateApplicationUserRoleConnectionRequest.md | 31 + docs/UpdateAutoModerationRuleRequest.md | 36 + docs/UpdateChannelRequest.md | 54 + docs/UpdateDMRequestPartial.md | 29 + docs/UpdateDefaultReactionEmojiRequest.md | 30 + docs/UpdateGroupDMRequestPartial.md | 30 + docs/UpdateGuildChannelRequestPartial.md | 48 + docs/UpdateGuildEmojiRequest.md | 30 + docs/UpdateGuildMemberRequest.md | 35 + docs/UpdateGuildOnboardingRequest.md | 32 + docs/UpdateGuildScheduledEventRequest.md | 38 + docs/UpdateGuildStickerRequest.md | 31 + docs/UpdateGuildTemplateRequest.md | 30 + docs/UpdateGuildWidgetSettingsRequest.md | 30 + ...UpdateMessageInteractionCallbackRequest.md | 30 + ...pdateMessageInteractionCallbackResponse.md | 30 + docs/UpdateMyGuildMemberRequest.md | 29 + docs/UpdateOnboardingPromptRequest.md | 35 + docs/UpdateSelfVoiceStateRequest.md | 31 + docs/UpdateStageInstanceRequest.md | 30 + docs/UpdateThreadRequestPartial.md | 40 + docs/UpdateThreadTagRequest.md | 33 + docs/UpdateVoiceStateRequest.md | 30 + docs/UpdateWebhookByTokenRequest.md | 30 + docs/UpdateWebhookRequest.md | 31 + docs/UserAvatarDecorationResponse.md | 30 + docs/UserCollectiblesResponse.md | 29 + docs/UserCommunicationDisabledAction.md | 30 + ...UserCommunicationDisabledActionMetadata.md | 29 + ...unicationDisabledActionMetadataResponse.md | 29 + ...UserCommunicationDisabledActionResponse.md | 30 + docs/UserGuildOnboardingResponse.md | 32 + docs/UserNameplateResponse.md | 32 + docs/UserPIIResponse.md | 47 + docs/UserPrimaryGuildResponse.md | 32 + docs/UserResponse.md | 42 + docs/UserSelectComponentForMessageRequest.md | 35 + docs/UserSelectComponentResponse.md | 36 + docs/UserSelectDefaultValue.md | 30 + docs/UserSelectDefaultValueResponse.md | 30 + docs/VanityURLErrorResponse.md | 30 + docs/VanityURLResponse.md | 31 + docs/VoiceRegionResponse.md | 33 + docs/VoiceScheduledEventCreateRequest.md | 37 + .../VoiceScheduledEventPatchRequestPartial.md | 38 + docs/VoiceScheduledEventResponse.md | 45 + docs/VoiceStateResponse.md | 41 + docs/WebhookSlackEmbed.md | 42 + docs/WebhookSlackEmbedField.md | 31 + docs/WebhookSourceChannelResponse.md | 30 + docs/WebhookSourceGuildResponse.md | 31 + docs/WelcomeMessageResponse.md | 30 + docs/WelcomeScreenPatchRequestPartial.md | 31 + docs/WidgetActivity.md | 29 + docs/WidgetChannel.md | 31 + docs/WidgetMember.md | 41 + docs/WidgetResponse.md | 34 + docs/WidgetSettingsResponse.md | 30 + pyproject.toml | 97 + requirements.txt | 6 + setup.cfg | 2 + setup.py | 86 + test-requirements.txt | 6 + test/__init__.py | 0 test/test_account_response.py | 87 + ...ction_row_component_for_message_request.py | 92 + ...nt_for_message_request_components_inner.py | 128 + ..._action_row_component_for_modal_request.py | 110 + test/test_action_row_component_response.py | 91 + ...row_component_response_components_inner.py | 137 + test/test_activities_attachment_response.py | 262 + test/test_add_group_dm_user201_response.py | 153 + test/test_add_group_dm_user_request.py | 86 + test/test_add_guild_member_request.py | 93 + test/test_add_lobby_member_request.py | 88 + ...t_application_command_attachment_option.py | 97 + ...tion_command_attachment_option_response.py | 99 + ...n_command_autocomplete_callback_request.py | 88 + ...mand_autocomplete_callback_request_data.py | 92 + ...test_application_command_boolean_option.py | 97 + ...ication_command_boolean_option_response.py | 99 + ...test_application_command_channel_option.py | 100 + ...ication_command_channel_option_response.py | 102 + ...test_application_command_create_request.py | 106 + ...on_command_create_request_options_inner.py | 116 + ...test_application_command_integer_option.py | 108 + ...ication_command_integer_option_response.py | 111 + ...n_command_interaction_metadata_response.py | 146 + ..._application_command_mentionable_option.py | 97 + ...ion_command_mentionable_option_response.py | 99 + .../test_application_command_number_option.py | 108 + ...lication_command_number_option_response.py | 111 + ...plication_command_option_integer_choice.py | 91 + ..._command_option_integer_choice_response.py | 92 + ...pplication_command_option_number_choice.py | 91 + ...n_command_option_number_choice_response.py | 92 + ...pplication_command_option_string_choice.py | 91 + ...n_command_option_string_choice_response.py | 92 + ...plication_command_patch_request_partial.py | 104 + test/test_application_command_permission.py | 90 + test/test_application_command_response.py | 117 + ...lication_command_response_options_inner.py | 119 + test/test_application_command_role_option.py | 97 + ...pplication_command_role_option_response.py | 99 + .../test_application_command_string_option.py | 108 + ...lication_command_string_option_response.py | 111 + ...ication_command_subcommand_group_option.py | 113 + ...ommand_subcommand_group_option_response.py | 117 + ...t_application_command_subcommand_option.py | 100 + ...command_subcommand_option_options_inner.py | 113 + ...tion_command_subcommand_option_response.py | 102 + ...ubcommand_option_response_options_inner.py | 116 + ...test_application_command_update_request.py | 107 + test/test_application_command_user_option.py | 97 + ...pplication_command_user_option_response.py | 99 + test/test_application_form_partial.py | 110 + ...st_application_form_partial_description.py | 89 + ..._partial_integration_types_config_value.py | 89 + ...t_application_incoming_webhook_response.py | 119 + ...lication_integration_type_configuration.py | 89 + ...integration_type_configuration_response.py | 89 + ...test_application_o_auth2_install_params.py | 88 + ...ication_o_auth2_install_params_response.py | 92 + test/test_application_response.py | 149 + ..._role_connections_metadata_item_request.py | 98 + ...role_connections_metadata_item_response.py | 98 + ...plication_user_role_connection_response.py | 89 + test/test_attachment_response.py | 191 + test/test_audit_log_entry_response.py | 100 + test/test_audit_log_object_change_response.py | 87 + test/test_ban_user_from_guild_request.py | 86 + ...test_base_create_message_create_request.py | 171 + ...message_create_request_components_inner.py | 122 + test/test_basic_application_response.py | 118 + test/test_basic_message_response.py | 938 + ...basic_message_response_components_inner.py | 155 + ...c_message_response_interaction_metadata.py | 152 + test/test_basic_message_response_nonce.py | 84 + test/test_block_message_action.py | 88 + test/test_block_message_action_metadata.py | 85 + ..._block_message_action_metadata_response.py | 85 + test/test_block_message_action_response.py | 90 + test/test_bot_account_patch_request.py | 88 + .../test_bulk_ban_users_from_guild_request.py | 91 + test/test_bulk_ban_users_response.py | 96 + test/test_bulk_delete_messages_request.py | 90 + test/test_bulk_lobby_member_request.py | 91 + ...ulk_update_guild_channels_request_inner.py | 88 + ...t_bulk_update_guild_roles_request_inner.py | 86 + ...st_button_component_for_message_request.py | 96 + test/test_button_component_response.py | 99 + test/test_channel_follower_response.py | 88 + .../test_channel_follower_webhook_response.py | 126 + ...st_channel_permission_overwrite_request.py | 89 + ...t_channel_permission_overwrite_response.py | 92 + ...el_select_component_for_message_request.py | 100 + .../test_channel_select_component_response.py | 102 + test/test_channel_select_default_value.py | 88 + ...t_channel_select_default_value_response.py | 88 + test/test_command_permission_response.py | 90 + test/test_command_permissions_response.py | 102 + ...est_component_emoji_for_message_request.py | 87 + test/test_component_emoji_response.py | 88 + test/test_connected_account_guild_response.py | 89 + ..._connected_account_integration_response.py | 102 + test/test_connected_account_response.py | 112 + ...container_component_for_message_request.py | 94 + ...nt_for_message_request_components_inner.py | 121 + test/test_container_component_response.py | 97 + ...ner_component_response_components_inner.py | 154 + test/test_create_application_emoji_request.py | 88 + ...create_auto_moderation_rule200_response.py | 111 + ...est_create_auto_moderation_rule_request.py | 106 + test/test_create_channel_invite_request.py | 91 + test/test_create_entitlement_request_data.py | 90 + test/test_create_forum_thread_request.py | 265 + test/test_create_group_dm_invite_request.py | 85 + test/test_create_guild_channel_request.py | 118 + test/test_create_guild_emoji_request.py | 91 + ...test_create_guild_from_template_request.py | 87 + test/test_create_guild_invite_request.py | 91 + .../test_create_guild_request_channel_item.py | 119 + test/test_create_guild_request_role_item.py | 92 + test/test_create_guild_role_request.py | 91 + ...st_create_guild_scheduled_event_request.py | 98 + test/test_create_guild_template_request.py | 87 + ...est_create_interaction_response_request.py | 224 + test/test_create_lobby_request.py | 96 + ...te_message_interaction_callback_request.py | 170 + ...e_message_interaction_callback_response.py | 848 + test/test_create_or_join_lobby_request.py | 93 + ...est_create_or_update_thread_tag_request.py | 89 + test/test_create_private_channel_request.py | 91 + test/test_create_stage_instance_request.py | 91 + ...create_text_thread_with_message_request.py | 88 + ...ate_text_thread_without_message_request.py | 90 + test/test_create_thread_request.py | 269 + test/test_create_webhook_request.py | 87 + test/test_created_thread_response.py | 126 + test/test_default_api.py | 1397 + ...t_default_keyword_list_trigger_metadata.py | 90 + ..._keyword_list_trigger_metadata_response.py | 96 + ...est_default_keyword_list_upsert_request.py | 114 + ...yword_list_upsert_request_actions_inner.py | 90 + ...ult_keyword_list_upsert_request_partial.py | 104 + test/test_default_keyword_rule_response.py | 123 + ...ult_keyword_rule_response_actions_inner.py | 90 + test/test_default_reaction_emoji_response.py | 86 + test/test_discord_integration_response.py | 188 + test/test_edit_lobby_channel_link_request.py | 85 + test/test_embedded_activity_instance.py | 97 + ...est_embedded_activity_instance_location.py | 92 + test/test_emoji_response.py | 127 + test/test_entitlement_response.py | 102 + test/test_entity_metadata_external.py | 86 + .../test_entity_metadata_external_response.py | 86 + test/test_error.py | 88 + test/test_error_details.py | 94 + test/test_error_response.py | 89 + test/test_execute_webhook_request.py | 174 + ...xternal_connection_integration_response.py | 151 + ...external_scheduled_event_create_request.py | 100 + ...l_scheduled_event_patch_request_partial.py | 95 + .../test_external_scheduled_event_response.py | 188 + ...test_file_component_for_message_request.py | 91 + test/test_file_component_response.py | 108 + test/test_flag_to_channel_action.py | 90 + test/test_flag_to_channel_action_metadata.py | 86 + ...lag_to_channel_action_metadata_response.py | 86 + test/test_flag_to_channel_action_response.py | 90 + test/test_follow_channel_request.py | 86 + test/test_forum_tag_response.py | 92 + test/test_friend_invite_response.py | 129 + test/test_gateway_bot_response.py | 98 + ...ateway_bot_session_start_limit_response.py | 92 + test/test_gateway_response.py | 86 + test/test_get_channel200_response.py | 214 + ...test_get_entitlements_sku_ids_parameter.py | 84 + test/test_get_sticker200_response.py | 128 + test/test_github_author.py | 87 + test/test_github_check_app.py | 86 + test/test_github_check_pull_request.py | 86 + test/test_github_check_run.py | 117 + test/test_github_check_run_output.py | 86 + test/test_github_check_suite.py | 96 + test/test_github_comment.py | 101 + test/test_github_commit.py | 96 + test/test_github_discussion.py | 102 + test/test_github_issue.py | 104 + test/test_github_release.py | 100 + test/test_github_repository.py | 92 + test/test_github_review.py | 99 + test/test_github_user.py | 92 + test/test_github_webhook.py | 235 + test/test_group_dm_invite_response.py | 125 + test/test_guild_audit_log_response.py | 328 + ...d_audit_log_response_integrations_inner.py | 94 + test/test_guild_ban_response.py | 135 + test/test_guild_channel_location.py | 92 + test/test_guild_channel_response.py | 132 + test/test_guild_create_request.py | 143 + test/test_guild_home_settings_response.py | 116 + test/test_guild_incoming_webhook_response.py | 121 + test/test_guild_invite_response.py | 305 + test/test_guild_member_response.py | 158 + test/test_guild_mfa_level_response.py | 86 + test/test_guild_onboarding_response.py | 142 + test/test_guild_patch_request_partial.py | 108 + test/test_guild_preview_response.py | 249 + test/test_guild_product_purchase_response.py | 88 + test/test_guild_prune_response.py | 85 + test/test_guild_response.py | 330 + test/test_guild_role_response.py | 110 + test/test_guild_role_tags_response.py | 90 + test/test_guild_sticker_response.py | 123 + ...guild_subscription_integration_response.py | 93 + test/test_guild_template_channel_response.py | 132 + test/test_guild_template_channel_tags.py | 89 + test/test_guild_template_response.py | 247 + test/test_guild_template_role_response.py | 98 + test/test_guild_template_snapshot_response.py | 200 + test/test_guild_welcome_channel.py | 90 + ...t_guild_welcome_screen_channel_response.py | 90 + test/test_guild_welcome_screen_response.py | 99 + test/test_guild_with_counts_response.py | 332 + ...st_incoming_webhook_interaction_request.py | 168 + test/test_incoming_webhook_request_partial.py | 174 + ...or_interaction_callback_request_partial.py | 152 + ...incoming_webhook_update_request_partial.py | 167 + test/test_inner_errors.py | 94 + test/test_integration_application_response.py | 118 + ...mand_autocomplete_callback_integer_data.py | 92 + ...mmand_autocomplete_callback_number_data.py | 92 + ...mmand_autocomplete_callback_string_data.py | 92 + test/test_interaction_callback_response.py | 101 + ..._interaction_callback_response_resource.py | 852 + test/test_interaction_response.py | 93 + test/test_invite_application_response.py | 149 + .../test_invite_channel_recipient_response.py | 86 + test/test_invite_channel_response.py | 94 + test/test_invite_guild_response.py | 103 + test/test_keyword_rule_response.py | 129 + test/test_keyword_trigger_metadata.py | 93 + .../test_keyword_trigger_metadata_response.py | 102 + test/test_keyword_upsert_request.py | 110 + test/test_keyword_upsert_request_partial.py | 107 + ...h_activity_interaction_callback_request.py | 86 + ..._activity_interaction_callback_response.py | 86 + test/test_list_application_emojis_response.py | 158 + ...auto_moderation_rules200_response_inner.py | 111 + ..._list_channel_invites200_response_inner.py | 310 + ...list_channel_webhooks200_response_inner.py | 129 + ...st_guild_integrations200_response_inner.py | 223 + ...uild_scheduled_events200_response_inner.py | 188 + ...t_list_guild_soundboard_sounds_response.py | 154 + test/test_lobby_member_request.py | 90 + test/test_lobby_member_response.py | 91 + test/test_lobby_message_response.py | 150 + test/test_lobby_response.py | 142 + ...a_gallery_component_for_message_request.py | 100 + test/test_media_gallery_component_response.py | 114 + test/test_media_gallery_item_request.py | 90 + test/test_media_gallery_item_response.py | 103 + test/test_mention_spam_rule_response.py | 115 + test/test_mention_spam_trigger_metadata.py | 87 + ..._mention_spam_trigger_metadata_response.py | 87 + test/test_mention_spam_upsert_request.py | 103 + ...est_mention_spam_upsert_request_partial.py | 100 + ...le_select_component_for_message_request.py | 95 + ...or_message_request_default_values_inner.py | 88 + ...t_mentionable_select_component_response.py | 97 + ...component_response_default_values_inner.py | 88 + test/test_message_allowed_mentions_request.py | 94 + test/test_message_attachment_request.py | 92 + test/test_message_attachment_response.py | 191 + test/test_message_call_response.py | 91 + ...component_interaction_metadata_response.py | 122 + test/test_message_create_request.py | 180 + test/test_message_edit_request_partial.py | 155 + test/test_message_embed_author_response.py | 89 + test/test_message_embed_field_response.py | 90 + test/test_message_embed_footer_response.py | 88 + test/test_message_embed_image_response.py | 93 + test/test_message_embed_provider_response.py | 87 + test/test_message_embed_response.py | 139 + test/test_message_embed_video_response.py | 93 + test/test_message_interaction_response.py | 116 + test/test_message_mention_channel_response.py | 92 + ...message_reaction_count_details_response.py | 88 + test/test_message_reaction_emoji_response.py | 87 + test/test_message_reaction_response.py | 110 + test/test_message_reference_request.py | 90 + test/test_message_reference_response.py | 89 + test/test_message_response.py | 1310 + ...message_role_subscription_data_response.py | 92 + test/test_message_snapshot_response.py | 283 + test/test_message_sticker_item_response.py | 90 + test/test_minimal_content_message_response.py | 526 + test/test_ml_spam_rule_response.py | 111 + test/test_ml_spam_upsert_request.py | 101 + test/test_ml_spam_upsert_request_partial.py | 98 + ...test_modal_interaction_callback_request.py | 124 + ...modal_interaction_callback_request_data.py | 120 + ...al_submit_interaction_metadata_response.py | 122 + ...esponse_triggering_interaction_metadata.py | 150 + test/test_my_guild_response.py | 102 + test/test_new_member_action_response.py | 97 + ...test_o_auth2_get_authorization_response.py | 239 + test/test_o_auth2_get_keys.py | 102 + ..._get_open_id_connect_user_info_response.py | 92 + test/test_o_auth2_key.py | 96 + test/test_onboarding_prompt_option_request.py | 97 + .../test_onboarding_prompt_option_response.py | 110 + test/test_onboarding_prompt_response.py | 128 + ...st_partial_discord_integration_response.py | 94 + ...xternal_connection_integration_response.py | 92 + ...guild_subscription_integration_response.py | 92 + ...sdk_unmerge_provisional_account_request.py | 91 + test/test_pinned_message_response.py | 848 + test/test_pinned_messages_response.py | 468 + test/test_poll_answer_create_request.py | 96 + test/test_poll_answer_details_response.py | 111 + test/test_poll_answer_response.py | 98 + test/test_poll_create_request.py | 117 + test/test_poll_emoji.py | 87 + test/test_poll_emoji_create_request.py | 87 + test/test_poll_media.py | 89 + test/test_poll_media_create_request.py | 89 + test/test_poll_media_response.py | 89 + test/test_poll_response.py | 138 + test/test_poll_results_entry_response.py | 89 + test/test_poll_results_response.py | 92 + .../test_pong_interaction_callback_request.py | 86 + test/test_private_application_response.py | 250 + test/test_private_channel_location.py | 90 + test/test_private_channel_response.py | 146 + test/test_private_group_channel_response.py | 151 + test/test_private_guild_member_response.py | 158 + test/test_provisional_token_response.py | 99 + test/test_prune_guild_request.py | 87 + .../test_prune_guild_request_include_roles.py | 84 + test/test_purchase_notification_response.py | 89 + test/test_quarantine_user_action.py | 87 + test/test_quarantine_user_action_response.py | 88 + test/test_resolved_objects_response.py | 268 + test/test_resource_channel_response.py | 95 + test/test_rich_embed.py | 130 + test/test_rich_embed_author.py | 87 + test/test_rich_embed_field.py | 89 + test/test_rich_embed_footer.py | 86 + test/test_rich_embed_image.py | 91 + test/test_rich_embed_provider.py | 86 + test/test_rich_embed_thumbnail.py | 91 + test/test_rich_embed_video.py | 91 + ...le_select_component_for_message_request.py | 97 + test/test_role_select_component_response.py | 99 + test/test_role_select_default_value.py | 88 + ...test_role_select_default_value_response.py | 88 + test/test_scheduled_event_response.py | 184 + test/test_scheduled_event_user_response.py | 152 + test/test_sdk_message_request.py | 180 + ...t_section_component_for_message_request.py | 98 + ...component_for_message_request_accessory.py | 102 + test/test_section_component_response.py | 102 + ...st_section_component_response_accessory.py | 118 + ...separator_component_for_message_request.py | 88 + test/test_separator_component_response.py | 92 + ...et_channel_permission_overwrite_request.py | 87 + ...application_command_permissions_request.py | 90 + test/test_set_guild_mfa_level_request.py | 86 + test/test_settings_emoji_response.py | 87 + test/test_slack_webhook.py | 109 + test/test_soundboard_create_request.py | 91 + test/test_soundboard_patch_request_partial.py | 88 + test/test_soundboard_sound_response.py | 120 + test/test_soundboard_sound_send_request.py | 87 + test/test_spam_link_rule_response.py | 111 + test/test_stage_instance_response.py | 96 + ...st_stage_scheduled_event_create_request.py | 97 + ...e_scheduled_event_patch_request_partial.py | 94 + test/test_stage_scheduled_event_response.py | 185 + test/test_standard_sticker_response.py | 98 + test/test_sticker_pack_collection_response.py | 124 + test/test_sticker_pack_response.py | 115 + ...ng_select_component_for_message_request.py | 112 + test/test_string_select_component_response.py | 116 + ...tring_select_option_for_message_request.py | 93 + test/test_string_select_option_response.py | 94 + test/test_team_member_response.py | 138 + test/test_team_response.py | 151 + ...t_display_component_for_message_request.py | 88 + test/test_text_display_component_response.py | 90 + ..._text_input_component_for_modal_request.py | 97 + test/test_text_input_component_response.py | 98 + test/test_thread_member_response.py | 131 + test/test_thread_metadata_response.py | 93 + test/test_thread_response.py | 126 + test/test_thread_search_response.py | 641 + test/test_thread_search_tag_parameter.py | 84 + test/test_threads_response.py | 640 + ...thumbnail_component_for_message_request.py | 92 + test/test_thumbnail_component_response.py | 107 + test/test_unfurled_media_request.py | 86 + ...uest_with_attachment_reference_required.py | 86 + test/test_unfurled_media_response.py | 94 + test/test_update_application_emoji_request.py | 85 + ...pplication_user_role_connection_request.py | 89 + ...est_update_auto_moderation_rule_request.py | 100 + test/test_update_channel_request.py | 127 + ...t_update_default_reaction_emoji_request.py | 86 + test/test_update_dm_request_partial.py | 85 + test/test_update_group_dm_request_partial.py | 86 + ...st_update_guild_channel_request_partial.py | 119 + test/test_update_guild_emoji_request.py | 88 + test/test_update_guild_member_request.py | 93 + test/test_update_guild_onboarding_request.py | 113 + ...st_update_guild_scheduled_event_request.py | 94 + test/test_update_guild_sticker_request.py | 87 + test/test_update_guild_template_request.py | 86 + ...st_update_guild_widget_settings_request.py | 86 + ...te_message_interaction_callback_request.py | 155 + ...e_message_interaction_callback_response.py | 848 + test/test_update_my_guild_member_request.py | 85 + test/test_update_onboarding_prompt_request.py | 122 + test/test_update_self_voice_state_request.py | 87 + test/test_update_stage_instance_request.py | 86 + test/test_update_thread_request_partial.py | 98 + test/test_update_thread_tag_request.py | 90 + test/test_update_voice_state_request.py | 86 + test/test_update_webhook_by_token_request.py | 86 + test/test_update_webhook_request.py | 87 + test/test_user_avatar_decoration_response.py | 87 + test/test_user_collectibles_response.py | 89 + ...test_user_communication_disabled_action.py | 90 + ..._communication_disabled_action_metadata.py | 85 + ...ation_disabled_action_metadata_response.py | 86 + ..._communication_disabled_action_response.py | 90 + test/test_user_guild_onboarding_response.py | 142 + test/test_user_nameplate_response.py | 88 + test/test_user_pii_response.py | 121 + test/test_user_primary_guild_response.py | 88 + test/test_user_response.py | 114 + ...er_select_component_for_message_request.py | 97 + test/test_user_select_component_response.py | 99 + test/test_user_select_default_value.py | 88 + ...test_user_select_default_value_response.py | 88 + test/test_vanity_url_error_response.py | 88 + test/test_vanity_url_response.py | 90 + test/test_voice_region_response.py | 94 + ...st_voice_scheduled_event_create_request.py | 97 + ...e_scheduled_event_patch_request_partial.py | 94 + test/test_voice_scheduled_event_response.py | 185 + test/test_voice_state_response.py | 144 + test/test_webhook_slack_embed.py | 103 + test/test_webhook_slack_embed_field.py | 87 + test/test_webhook_source_channel_response.py | 88 + test/test_webhook_source_guild_response.py | 89 + test/test_welcome_message_response.py | 92 + ...st_welcome_screen_patch_request_partial.py | 93 + test/test_widget_activity.py | 86 + test/test_widget_channel.py | 90 + test/test_widget_member.py | 103 + test/test_widget_response.py | 137 + test/test_widget_settings_response.py | 87 + tox.ini | 9 + 1399 files changed, 237471 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/python.yml create mode 100644 .gitignore create mode 100644 dc_rest/__init__.py create mode 100644 dc_rest/api/__init__.py create mode 100644 dc_rest/api/default_api.py create mode 100644 dc_rest/api_client.py create mode 100644 dc_rest/api_response.py create mode 100644 dc_rest/configuration.py create mode 100644 dc_rest/exceptions.py create mode 100644 dc_rest/models/__init__.py create mode 100644 dc_rest/models/account_response.py create mode 100644 dc_rest/models/action_row_component_for_message_request.py create mode 100644 dc_rest/models/action_row_component_for_message_request_components_inner.py create mode 100644 dc_rest/models/action_row_component_for_modal_request.py create mode 100644 dc_rest/models/action_row_component_response.py create mode 100644 dc_rest/models/action_row_component_response_components_inner.py create mode 100644 dc_rest/models/activities_attachment_response.py create mode 100644 dc_rest/models/add_group_dm_user201_response.py create mode 100644 dc_rest/models/add_group_dm_user_request.py create mode 100644 dc_rest/models/add_guild_member_request.py create mode 100644 dc_rest/models/add_lobby_member_request.py create mode 100644 dc_rest/models/application_command_attachment_option.py create mode 100644 dc_rest/models/application_command_attachment_option_response.py create mode 100644 dc_rest/models/application_command_autocomplete_callback_request.py create mode 100644 dc_rest/models/application_command_autocomplete_callback_request_data.py create mode 100644 dc_rest/models/application_command_boolean_option.py create mode 100644 dc_rest/models/application_command_boolean_option_response.py create mode 100644 dc_rest/models/application_command_channel_option.py create mode 100644 dc_rest/models/application_command_channel_option_response.py create mode 100644 dc_rest/models/application_command_create_request.py create mode 100644 dc_rest/models/application_command_create_request_options_inner.py create mode 100644 dc_rest/models/application_command_integer_option.py create mode 100644 dc_rest/models/application_command_integer_option_response.py create mode 100644 dc_rest/models/application_command_interaction_metadata_response.py create mode 100644 dc_rest/models/application_command_mentionable_option.py create mode 100644 dc_rest/models/application_command_mentionable_option_response.py create mode 100644 dc_rest/models/application_command_number_option.py create mode 100644 dc_rest/models/application_command_number_option_response.py create mode 100644 dc_rest/models/application_command_option_integer_choice.py create mode 100644 dc_rest/models/application_command_option_integer_choice_response.py create mode 100644 dc_rest/models/application_command_option_number_choice.py create mode 100644 dc_rest/models/application_command_option_number_choice_response.py create mode 100644 dc_rest/models/application_command_option_string_choice.py create mode 100644 dc_rest/models/application_command_option_string_choice_response.py create mode 100644 dc_rest/models/application_command_patch_request_partial.py create mode 100644 dc_rest/models/application_command_permission.py create mode 100644 dc_rest/models/application_command_response.py create mode 100644 dc_rest/models/application_command_response_options_inner.py create mode 100644 dc_rest/models/application_command_role_option.py create mode 100644 dc_rest/models/application_command_role_option_response.py create mode 100644 dc_rest/models/application_command_string_option.py create mode 100644 dc_rest/models/application_command_string_option_response.py create mode 100644 dc_rest/models/application_command_subcommand_group_option.py create mode 100644 dc_rest/models/application_command_subcommand_group_option_response.py create mode 100644 dc_rest/models/application_command_subcommand_option.py create mode 100644 dc_rest/models/application_command_subcommand_option_options_inner.py create mode 100644 dc_rest/models/application_command_subcommand_option_response.py create mode 100644 dc_rest/models/application_command_subcommand_option_response_options_inner.py create mode 100644 dc_rest/models/application_command_update_request.py create mode 100644 dc_rest/models/application_command_user_option.py create mode 100644 dc_rest/models/application_command_user_option_response.py create mode 100644 dc_rest/models/application_form_partial.py create mode 100644 dc_rest/models/application_form_partial_description.py create mode 100644 dc_rest/models/application_form_partial_integration_types_config_value.py create mode 100644 dc_rest/models/application_incoming_webhook_response.py create mode 100644 dc_rest/models/application_integration_type_configuration.py create mode 100644 dc_rest/models/application_integration_type_configuration_response.py create mode 100644 dc_rest/models/application_o_auth2_install_params.py create mode 100644 dc_rest/models/application_o_auth2_install_params_response.py create mode 100644 dc_rest/models/application_response.py create mode 100644 dc_rest/models/application_role_connections_metadata_item_request.py create mode 100644 dc_rest/models/application_role_connections_metadata_item_response.py create mode 100644 dc_rest/models/application_user_role_connection_response.py create mode 100644 dc_rest/models/attachment_response.py create mode 100644 dc_rest/models/audit_log_entry_response.py create mode 100644 dc_rest/models/audit_log_object_change_response.py create mode 100644 dc_rest/models/ban_user_from_guild_request.py create mode 100644 dc_rest/models/base_create_message_create_request.py create mode 100644 dc_rest/models/base_create_message_create_request_components_inner.py create mode 100644 dc_rest/models/basic_application_response.py create mode 100644 dc_rest/models/basic_message_response.py create mode 100644 dc_rest/models/basic_message_response_components_inner.py create mode 100644 dc_rest/models/basic_message_response_interaction_metadata.py create mode 100644 dc_rest/models/basic_message_response_nonce.py create mode 100644 dc_rest/models/block_message_action.py create mode 100644 dc_rest/models/block_message_action_metadata.py create mode 100644 dc_rest/models/block_message_action_metadata_response.py create mode 100644 dc_rest/models/block_message_action_response.py create mode 100644 dc_rest/models/bot_account_patch_request.py create mode 100644 dc_rest/models/bulk_ban_users_from_guild_request.py create mode 100644 dc_rest/models/bulk_ban_users_response.py create mode 100644 dc_rest/models/bulk_delete_messages_request.py create mode 100644 dc_rest/models/bulk_lobby_member_request.py create mode 100644 dc_rest/models/bulk_update_guild_channels_request_inner.py create mode 100644 dc_rest/models/bulk_update_guild_roles_request_inner.py create mode 100644 dc_rest/models/button_component_for_message_request.py create mode 100644 dc_rest/models/button_component_response.py create mode 100644 dc_rest/models/channel_follower_response.py create mode 100644 dc_rest/models/channel_follower_webhook_response.py create mode 100644 dc_rest/models/channel_permission_overwrite_request.py create mode 100644 dc_rest/models/channel_permission_overwrite_response.py create mode 100644 dc_rest/models/channel_select_component_for_message_request.py create mode 100644 dc_rest/models/channel_select_component_response.py create mode 100644 dc_rest/models/channel_select_default_value.py create mode 100644 dc_rest/models/channel_select_default_value_response.py create mode 100644 dc_rest/models/command_permission_response.py create mode 100644 dc_rest/models/command_permissions_response.py create mode 100644 dc_rest/models/component_emoji_for_message_request.py create mode 100644 dc_rest/models/component_emoji_response.py create mode 100644 dc_rest/models/connected_account_guild_response.py create mode 100644 dc_rest/models/connected_account_integration_response.py create mode 100644 dc_rest/models/connected_account_response.py create mode 100644 dc_rest/models/container_component_for_message_request.py create mode 100644 dc_rest/models/container_component_for_message_request_components_inner.py create mode 100644 dc_rest/models/container_component_response.py create mode 100644 dc_rest/models/container_component_response_components_inner.py create mode 100644 dc_rest/models/create_application_emoji_request.py create mode 100644 dc_rest/models/create_auto_moderation_rule200_response.py create mode 100644 dc_rest/models/create_auto_moderation_rule_request.py create mode 100644 dc_rest/models/create_channel_invite_request.py create mode 100644 dc_rest/models/create_entitlement_request_data.py create mode 100644 dc_rest/models/create_forum_thread_request.py create mode 100644 dc_rest/models/create_group_dm_invite_request.py create mode 100644 dc_rest/models/create_guild_channel_request.py create mode 100644 dc_rest/models/create_guild_emoji_request.py create mode 100644 dc_rest/models/create_guild_from_template_request.py create mode 100644 dc_rest/models/create_guild_invite_request.py create mode 100644 dc_rest/models/create_guild_request_channel_item.py create mode 100644 dc_rest/models/create_guild_request_role_item.py create mode 100644 dc_rest/models/create_guild_role_request.py create mode 100644 dc_rest/models/create_guild_scheduled_event_request.py create mode 100644 dc_rest/models/create_guild_template_request.py create mode 100644 dc_rest/models/create_interaction_response_request.py create mode 100644 dc_rest/models/create_lobby_request.py create mode 100644 dc_rest/models/create_message_interaction_callback_request.py create mode 100644 dc_rest/models/create_message_interaction_callback_response.py create mode 100644 dc_rest/models/create_or_join_lobby_request.py create mode 100644 dc_rest/models/create_or_update_thread_tag_request.py create mode 100644 dc_rest/models/create_private_channel_request.py create mode 100644 dc_rest/models/create_stage_instance_request.py create mode 100644 dc_rest/models/create_text_thread_with_message_request.py create mode 100644 dc_rest/models/create_text_thread_without_message_request.py create mode 100644 dc_rest/models/create_thread_request.py create mode 100644 dc_rest/models/create_webhook_request.py create mode 100644 dc_rest/models/created_thread_response.py create mode 100644 dc_rest/models/default_keyword_list_trigger_metadata.py create mode 100644 dc_rest/models/default_keyword_list_trigger_metadata_response.py create mode 100644 dc_rest/models/default_keyword_list_upsert_request.py create mode 100644 dc_rest/models/default_keyword_list_upsert_request_actions_inner.py create mode 100644 dc_rest/models/default_keyword_list_upsert_request_partial.py create mode 100644 dc_rest/models/default_keyword_rule_response.py create mode 100644 dc_rest/models/default_keyword_rule_response_actions_inner.py create mode 100644 dc_rest/models/default_reaction_emoji_response.py create mode 100644 dc_rest/models/discord_integration_response.py create mode 100644 dc_rest/models/edit_lobby_channel_link_request.py create mode 100644 dc_rest/models/embedded_activity_instance.py create mode 100644 dc_rest/models/embedded_activity_instance_location.py create mode 100644 dc_rest/models/emoji_response.py create mode 100644 dc_rest/models/entitlement_response.py create mode 100644 dc_rest/models/entity_metadata_external.py create mode 100644 dc_rest/models/entity_metadata_external_response.py create mode 100644 dc_rest/models/error.py create mode 100644 dc_rest/models/error_details.py create mode 100644 dc_rest/models/error_response.py create mode 100644 dc_rest/models/execute_webhook_request.py create mode 100644 dc_rest/models/external_connection_integration_response.py create mode 100644 dc_rest/models/external_scheduled_event_create_request.py create mode 100644 dc_rest/models/external_scheduled_event_patch_request_partial.py create mode 100644 dc_rest/models/external_scheduled_event_response.py create mode 100644 dc_rest/models/file_component_for_message_request.py create mode 100644 dc_rest/models/file_component_response.py create mode 100644 dc_rest/models/flag_to_channel_action.py create mode 100644 dc_rest/models/flag_to_channel_action_metadata.py create mode 100644 dc_rest/models/flag_to_channel_action_metadata_response.py create mode 100644 dc_rest/models/flag_to_channel_action_response.py create mode 100644 dc_rest/models/follow_channel_request.py create mode 100644 dc_rest/models/forum_tag_response.py create mode 100644 dc_rest/models/friend_invite_response.py create mode 100644 dc_rest/models/gateway_bot_response.py create mode 100644 dc_rest/models/gateway_bot_session_start_limit_response.py create mode 100644 dc_rest/models/gateway_response.py create mode 100644 dc_rest/models/get_channel200_response.py create mode 100644 dc_rest/models/get_entitlements_sku_ids_parameter.py create mode 100644 dc_rest/models/get_sticker200_response.py create mode 100644 dc_rest/models/github_author.py create mode 100644 dc_rest/models/github_check_app.py create mode 100644 dc_rest/models/github_check_pull_request.py create mode 100644 dc_rest/models/github_check_run.py create mode 100644 dc_rest/models/github_check_run_output.py create mode 100644 dc_rest/models/github_check_suite.py create mode 100644 dc_rest/models/github_comment.py create mode 100644 dc_rest/models/github_commit.py create mode 100644 dc_rest/models/github_discussion.py create mode 100644 dc_rest/models/github_issue.py create mode 100644 dc_rest/models/github_release.py create mode 100644 dc_rest/models/github_repository.py create mode 100644 dc_rest/models/github_review.py create mode 100644 dc_rest/models/github_user.py create mode 100644 dc_rest/models/github_webhook.py create mode 100644 dc_rest/models/group_dm_invite_response.py create mode 100644 dc_rest/models/guild_audit_log_response.py create mode 100644 dc_rest/models/guild_audit_log_response_integrations_inner.py create mode 100644 dc_rest/models/guild_ban_response.py create mode 100644 dc_rest/models/guild_channel_location.py create mode 100644 dc_rest/models/guild_channel_response.py create mode 100644 dc_rest/models/guild_create_request.py create mode 100644 dc_rest/models/guild_home_settings_response.py create mode 100644 dc_rest/models/guild_incoming_webhook_response.py create mode 100644 dc_rest/models/guild_invite_response.py create mode 100644 dc_rest/models/guild_member_response.py create mode 100644 dc_rest/models/guild_mfa_level_response.py create mode 100644 dc_rest/models/guild_onboarding_response.py create mode 100644 dc_rest/models/guild_patch_request_partial.py create mode 100644 dc_rest/models/guild_preview_response.py create mode 100644 dc_rest/models/guild_product_purchase_response.py create mode 100644 dc_rest/models/guild_prune_response.py create mode 100644 dc_rest/models/guild_response.py create mode 100644 dc_rest/models/guild_role_response.py create mode 100644 dc_rest/models/guild_role_tags_response.py create mode 100644 dc_rest/models/guild_sticker_response.py create mode 100644 dc_rest/models/guild_subscription_integration_response.py create mode 100644 dc_rest/models/guild_template_channel_response.py create mode 100644 dc_rest/models/guild_template_channel_tags.py create mode 100644 dc_rest/models/guild_template_response.py create mode 100644 dc_rest/models/guild_template_role_response.py create mode 100644 dc_rest/models/guild_template_snapshot_response.py create mode 100644 dc_rest/models/guild_welcome_channel.py create mode 100644 dc_rest/models/guild_welcome_screen_channel_response.py create mode 100644 dc_rest/models/guild_welcome_screen_response.py create mode 100644 dc_rest/models/guild_with_counts_response.py create mode 100644 dc_rest/models/incoming_webhook_interaction_request.py create mode 100644 dc_rest/models/incoming_webhook_request_partial.py create mode 100644 dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py create mode 100644 dc_rest/models/incoming_webhook_update_request_partial.py create mode 100644 dc_rest/models/inner_errors.py create mode 100644 dc_rest/models/integration_application_response.py create mode 100644 dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py create mode 100644 dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py create mode 100644 dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py create mode 100644 dc_rest/models/interaction_callback_response.py create mode 100644 dc_rest/models/interaction_callback_response_resource.py create mode 100644 dc_rest/models/interaction_response.py create mode 100644 dc_rest/models/invite_application_response.py create mode 100644 dc_rest/models/invite_channel_recipient_response.py create mode 100644 dc_rest/models/invite_channel_response.py create mode 100644 dc_rest/models/invite_guild_response.py create mode 100644 dc_rest/models/keyword_rule_response.py create mode 100644 dc_rest/models/keyword_trigger_metadata.py create mode 100644 dc_rest/models/keyword_trigger_metadata_response.py create mode 100644 dc_rest/models/keyword_upsert_request.py create mode 100644 dc_rest/models/keyword_upsert_request_partial.py create mode 100644 dc_rest/models/launch_activity_interaction_callback_request.py create mode 100644 dc_rest/models/launch_activity_interaction_callback_response.py create mode 100644 dc_rest/models/list_application_emojis_response.py create mode 100644 dc_rest/models/list_auto_moderation_rules200_response_inner.py create mode 100644 dc_rest/models/list_channel_invites200_response_inner.py create mode 100644 dc_rest/models/list_channel_webhooks200_response_inner.py create mode 100644 dc_rest/models/list_guild_integrations200_response_inner.py create mode 100644 dc_rest/models/list_guild_scheduled_events200_response_inner.py create mode 100644 dc_rest/models/list_guild_soundboard_sounds_response.py create mode 100644 dc_rest/models/lobby_member_request.py create mode 100644 dc_rest/models/lobby_member_response.py create mode 100644 dc_rest/models/lobby_message_response.py create mode 100644 dc_rest/models/lobby_response.py create mode 100644 dc_rest/models/media_gallery_component_for_message_request.py create mode 100644 dc_rest/models/media_gallery_component_response.py create mode 100644 dc_rest/models/media_gallery_item_request.py create mode 100644 dc_rest/models/media_gallery_item_response.py create mode 100644 dc_rest/models/mention_spam_rule_response.py create mode 100644 dc_rest/models/mention_spam_trigger_metadata.py create mode 100644 dc_rest/models/mention_spam_trigger_metadata_response.py create mode 100644 dc_rest/models/mention_spam_upsert_request.py create mode 100644 dc_rest/models/mention_spam_upsert_request_partial.py create mode 100644 dc_rest/models/mentionable_select_component_for_message_request.py create mode 100644 dc_rest/models/mentionable_select_component_for_message_request_default_values_inner.py create mode 100644 dc_rest/models/mentionable_select_component_response.py create mode 100644 dc_rest/models/mentionable_select_component_response_default_values_inner.py create mode 100644 dc_rest/models/message_allowed_mentions_request.py create mode 100644 dc_rest/models/message_attachment_request.py create mode 100644 dc_rest/models/message_attachment_response.py create mode 100644 dc_rest/models/message_call_response.py create mode 100644 dc_rest/models/message_component_interaction_metadata_response.py create mode 100644 dc_rest/models/message_create_request.py create mode 100644 dc_rest/models/message_edit_request_partial.py create mode 100644 dc_rest/models/message_embed_author_response.py create mode 100644 dc_rest/models/message_embed_field_response.py create mode 100644 dc_rest/models/message_embed_footer_response.py create mode 100644 dc_rest/models/message_embed_image_response.py create mode 100644 dc_rest/models/message_embed_provider_response.py create mode 100644 dc_rest/models/message_embed_response.py create mode 100644 dc_rest/models/message_embed_video_response.py create mode 100644 dc_rest/models/message_interaction_response.py create mode 100644 dc_rest/models/message_mention_channel_response.py create mode 100644 dc_rest/models/message_reaction_count_details_response.py create mode 100644 dc_rest/models/message_reaction_emoji_response.py create mode 100644 dc_rest/models/message_reaction_response.py create mode 100644 dc_rest/models/message_reference_request.py create mode 100644 dc_rest/models/message_reference_response.py create mode 100644 dc_rest/models/message_response.py create mode 100644 dc_rest/models/message_role_subscription_data_response.py create mode 100644 dc_rest/models/message_snapshot_response.py create mode 100644 dc_rest/models/message_sticker_item_response.py create mode 100644 dc_rest/models/minimal_content_message_response.py create mode 100644 dc_rest/models/ml_spam_rule_response.py create mode 100644 dc_rest/models/ml_spam_upsert_request.py create mode 100644 dc_rest/models/ml_spam_upsert_request_partial.py create mode 100644 dc_rest/models/modal_interaction_callback_request.py create mode 100644 dc_rest/models/modal_interaction_callback_request_data.py create mode 100644 dc_rest/models/modal_submit_interaction_metadata_response.py create mode 100644 dc_rest/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.py create mode 100644 dc_rest/models/my_guild_response.py create mode 100644 dc_rest/models/new_member_action_response.py create mode 100644 dc_rest/models/o_auth2_get_authorization_response.py create mode 100644 dc_rest/models/o_auth2_get_keys.py create mode 100644 dc_rest/models/o_auth2_get_open_id_connect_user_info_response.py create mode 100644 dc_rest/models/o_auth2_key.py create mode 100644 dc_rest/models/onboarding_prompt_option_request.py create mode 100644 dc_rest/models/onboarding_prompt_option_response.py create mode 100644 dc_rest/models/onboarding_prompt_response.py create mode 100644 dc_rest/models/partial_discord_integration_response.py create mode 100644 dc_rest/models/partial_external_connection_integration_response.py create mode 100644 dc_rest/models/partial_guild_subscription_integration_response.py create mode 100644 dc_rest/models/partner_sdk_unmerge_provisional_account_request.py create mode 100644 dc_rest/models/pinned_message_response.py create mode 100644 dc_rest/models/pinned_messages_response.py create mode 100644 dc_rest/models/poll_answer_create_request.py create mode 100644 dc_rest/models/poll_answer_details_response.py create mode 100644 dc_rest/models/poll_answer_response.py create mode 100644 dc_rest/models/poll_create_request.py create mode 100644 dc_rest/models/poll_emoji.py create mode 100644 dc_rest/models/poll_emoji_create_request.py create mode 100644 dc_rest/models/poll_media.py create mode 100644 dc_rest/models/poll_media_create_request.py create mode 100644 dc_rest/models/poll_media_response.py create mode 100644 dc_rest/models/poll_response.py create mode 100644 dc_rest/models/poll_results_entry_response.py create mode 100644 dc_rest/models/poll_results_response.py create mode 100644 dc_rest/models/pong_interaction_callback_request.py create mode 100644 dc_rest/models/private_application_response.py create mode 100644 dc_rest/models/private_channel_location.py create mode 100644 dc_rest/models/private_channel_response.py create mode 100644 dc_rest/models/private_group_channel_response.py create mode 100644 dc_rest/models/private_guild_member_response.py create mode 100644 dc_rest/models/provisional_token_response.py create mode 100644 dc_rest/models/prune_guild_request.py create mode 100644 dc_rest/models/prune_guild_request_include_roles.py create mode 100644 dc_rest/models/purchase_notification_response.py create mode 100644 dc_rest/models/quarantine_user_action.py create mode 100644 dc_rest/models/quarantine_user_action_response.py create mode 100644 dc_rest/models/resolved_objects_response.py create mode 100644 dc_rest/models/resource_channel_response.py create mode 100644 dc_rest/models/rich_embed.py create mode 100644 dc_rest/models/rich_embed_author.py create mode 100644 dc_rest/models/rich_embed_field.py create mode 100644 dc_rest/models/rich_embed_footer.py create mode 100644 dc_rest/models/rich_embed_image.py create mode 100644 dc_rest/models/rich_embed_provider.py create mode 100644 dc_rest/models/rich_embed_thumbnail.py create mode 100644 dc_rest/models/rich_embed_video.py create mode 100644 dc_rest/models/role_select_component_for_message_request.py create mode 100644 dc_rest/models/role_select_component_response.py create mode 100644 dc_rest/models/role_select_default_value.py create mode 100644 dc_rest/models/role_select_default_value_response.py create mode 100644 dc_rest/models/scheduled_event_response.py create mode 100644 dc_rest/models/scheduled_event_user_response.py create mode 100644 dc_rest/models/sdk_message_request.py create mode 100644 dc_rest/models/section_component_for_message_request.py create mode 100644 dc_rest/models/section_component_for_message_request_accessory.py create mode 100644 dc_rest/models/section_component_response.py create mode 100644 dc_rest/models/section_component_response_accessory.py create mode 100644 dc_rest/models/separator_component_for_message_request.py create mode 100644 dc_rest/models/separator_component_response.py create mode 100644 dc_rest/models/set_channel_permission_overwrite_request.py create mode 100644 dc_rest/models/set_guild_application_command_permissions_request.py create mode 100644 dc_rest/models/set_guild_mfa_level_request.py create mode 100644 dc_rest/models/settings_emoji_response.py create mode 100644 dc_rest/models/slack_webhook.py create mode 100644 dc_rest/models/soundboard_create_request.py create mode 100644 dc_rest/models/soundboard_patch_request_partial.py create mode 100644 dc_rest/models/soundboard_sound_response.py create mode 100644 dc_rest/models/soundboard_sound_send_request.py create mode 100644 dc_rest/models/spam_link_rule_response.py create mode 100644 dc_rest/models/stage_instance_response.py create mode 100644 dc_rest/models/stage_scheduled_event_create_request.py create mode 100644 dc_rest/models/stage_scheduled_event_patch_request_partial.py create mode 100644 dc_rest/models/stage_scheduled_event_response.py create mode 100644 dc_rest/models/standard_sticker_response.py create mode 100644 dc_rest/models/sticker_pack_collection_response.py create mode 100644 dc_rest/models/sticker_pack_response.py create mode 100644 dc_rest/models/string_select_component_for_message_request.py create mode 100644 dc_rest/models/string_select_component_response.py create mode 100644 dc_rest/models/string_select_option_for_message_request.py create mode 100644 dc_rest/models/string_select_option_response.py create mode 100644 dc_rest/models/team_member_response.py create mode 100644 dc_rest/models/team_response.py create mode 100644 dc_rest/models/text_display_component_for_message_request.py create mode 100644 dc_rest/models/text_display_component_response.py create mode 100644 dc_rest/models/text_input_component_for_modal_request.py create mode 100644 dc_rest/models/text_input_component_response.py create mode 100644 dc_rest/models/thread_member_response.py create mode 100644 dc_rest/models/thread_metadata_response.py create mode 100644 dc_rest/models/thread_response.py create mode 100644 dc_rest/models/thread_search_response.py create mode 100644 dc_rest/models/thread_search_tag_parameter.py create mode 100644 dc_rest/models/threads_response.py create mode 100644 dc_rest/models/thumbnail_component_for_message_request.py create mode 100644 dc_rest/models/thumbnail_component_response.py create mode 100644 dc_rest/models/unfurled_media_request.py create mode 100644 dc_rest/models/unfurled_media_request_with_attachment_reference_required.py create mode 100644 dc_rest/models/unfurled_media_response.py create mode 100644 dc_rest/models/update_application_emoji_request.py create mode 100644 dc_rest/models/update_application_user_role_connection_request.py create mode 100644 dc_rest/models/update_auto_moderation_rule_request.py create mode 100644 dc_rest/models/update_channel_request.py create mode 100644 dc_rest/models/update_default_reaction_emoji_request.py create mode 100644 dc_rest/models/update_dm_request_partial.py create mode 100644 dc_rest/models/update_group_dm_request_partial.py create mode 100644 dc_rest/models/update_guild_channel_request_partial.py create mode 100644 dc_rest/models/update_guild_emoji_request.py create mode 100644 dc_rest/models/update_guild_member_request.py create mode 100644 dc_rest/models/update_guild_onboarding_request.py create mode 100644 dc_rest/models/update_guild_scheduled_event_request.py create mode 100644 dc_rest/models/update_guild_sticker_request.py create mode 100644 dc_rest/models/update_guild_template_request.py create mode 100644 dc_rest/models/update_guild_widget_settings_request.py create mode 100644 dc_rest/models/update_message_interaction_callback_request.py create mode 100644 dc_rest/models/update_message_interaction_callback_response.py create mode 100644 dc_rest/models/update_my_guild_member_request.py create mode 100644 dc_rest/models/update_onboarding_prompt_request.py create mode 100644 dc_rest/models/update_self_voice_state_request.py create mode 100644 dc_rest/models/update_stage_instance_request.py create mode 100644 dc_rest/models/update_thread_request_partial.py create mode 100644 dc_rest/models/update_thread_tag_request.py create mode 100644 dc_rest/models/update_voice_state_request.py create mode 100644 dc_rest/models/update_webhook_by_token_request.py create mode 100644 dc_rest/models/update_webhook_request.py create mode 100644 dc_rest/models/user_avatar_decoration_response.py create mode 100644 dc_rest/models/user_collectibles_response.py create mode 100644 dc_rest/models/user_communication_disabled_action.py create mode 100644 dc_rest/models/user_communication_disabled_action_metadata.py create mode 100644 dc_rest/models/user_communication_disabled_action_metadata_response.py create mode 100644 dc_rest/models/user_communication_disabled_action_response.py create mode 100644 dc_rest/models/user_guild_onboarding_response.py create mode 100644 dc_rest/models/user_nameplate_response.py create mode 100644 dc_rest/models/user_pii_response.py create mode 100644 dc_rest/models/user_primary_guild_response.py create mode 100644 dc_rest/models/user_response.py create mode 100644 dc_rest/models/user_select_component_for_message_request.py create mode 100644 dc_rest/models/user_select_component_response.py create mode 100644 dc_rest/models/user_select_default_value.py create mode 100644 dc_rest/models/user_select_default_value_response.py create mode 100644 dc_rest/models/vanity_url_error_response.py create mode 100644 dc_rest/models/vanity_url_response.py create mode 100644 dc_rest/models/voice_region_response.py create mode 100644 dc_rest/models/voice_scheduled_event_create_request.py create mode 100644 dc_rest/models/voice_scheduled_event_patch_request_partial.py create mode 100644 dc_rest/models/voice_scheduled_event_response.py create mode 100644 dc_rest/models/voice_state_response.py create mode 100644 dc_rest/models/webhook_slack_embed.py create mode 100644 dc_rest/models/webhook_slack_embed_field.py create mode 100644 dc_rest/models/webhook_source_channel_response.py create mode 100644 dc_rest/models/webhook_source_guild_response.py create mode 100644 dc_rest/models/welcome_message_response.py create mode 100644 dc_rest/models/welcome_screen_patch_request_partial.py create mode 100644 dc_rest/models/widget_activity.py create mode 100644 dc_rest/models/widget_channel.py create mode 100644 dc_rest/models/widget_member.py create mode 100644 dc_rest/models/widget_response.py create mode 100644 dc_rest/models/widget_settings_response.py create mode 100644 dc_rest/py.typed create mode 100644 dc_rest/rest.py create mode 100644 docs/AccountResponse.md create mode 100644 docs/ActionRowComponentForMessageRequest.md create mode 100644 docs/ActionRowComponentForMessageRequestComponentsInner.md create mode 100644 docs/ActionRowComponentForModalRequest.md create mode 100644 docs/ActionRowComponentResponse.md create mode 100644 docs/ActionRowComponentResponseComponentsInner.md create mode 100644 docs/ActivitiesAttachmentResponse.md create mode 100644 docs/AddGroupDmUser201Response.md create mode 100644 docs/AddGroupDmUserRequest.md create mode 100644 docs/AddGuildMemberRequest.md create mode 100644 docs/AddLobbyMemberRequest.md create mode 100644 docs/ApplicationCommandAttachmentOption.md create mode 100644 docs/ApplicationCommandAttachmentOptionResponse.md create mode 100644 docs/ApplicationCommandAutocompleteCallbackRequest.md create mode 100644 docs/ApplicationCommandAutocompleteCallbackRequestData.md create mode 100644 docs/ApplicationCommandBooleanOption.md create mode 100644 docs/ApplicationCommandBooleanOptionResponse.md create mode 100644 docs/ApplicationCommandChannelOption.md create mode 100644 docs/ApplicationCommandChannelOptionResponse.md create mode 100644 docs/ApplicationCommandCreateRequest.md create mode 100644 docs/ApplicationCommandCreateRequestOptionsInner.md create mode 100644 docs/ApplicationCommandIntegerOption.md create mode 100644 docs/ApplicationCommandIntegerOptionResponse.md create mode 100644 docs/ApplicationCommandInteractionMetadataResponse.md create mode 100644 docs/ApplicationCommandMentionableOption.md create mode 100644 docs/ApplicationCommandMentionableOptionResponse.md create mode 100644 docs/ApplicationCommandNumberOption.md create mode 100644 docs/ApplicationCommandNumberOptionResponse.md create mode 100644 docs/ApplicationCommandOptionIntegerChoice.md create mode 100644 docs/ApplicationCommandOptionIntegerChoiceResponse.md create mode 100644 docs/ApplicationCommandOptionNumberChoice.md create mode 100644 docs/ApplicationCommandOptionNumberChoiceResponse.md create mode 100644 docs/ApplicationCommandOptionStringChoice.md create mode 100644 docs/ApplicationCommandOptionStringChoiceResponse.md create mode 100644 docs/ApplicationCommandPatchRequestPartial.md create mode 100644 docs/ApplicationCommandPermission.md create mode 100644 docs/ApplicationCommandResponse.md create mode 100644 docs/ApplicationCommandResponseOptionsInner.md create mode 100644 docs/ApplicationCommandRoleOption.md create mode 100644 docs/ApplicationCommandRoleOptionResponse.md create mode 100644 docs/ApplicationCommandStringOption.md create mode 100644 docs/ApplicationCommandStringOptionResponse.md create mode 100644 docs/ApplicationCommandSubcommandGroupOption.md create mode 100644 docs/ApplicationCommandSubcommandGroupOptionResponse.md create mode 100644 docs/ApplicationCommandSubcommandOption.md create mode 100644 docs/ApplicationCommandSubcommandOptionOptionsInner.md create mode 100644 docs/ApplicationCommandSubcommandOptionResponse.md create mode 100644 docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md create mode 100644 docs/ApplicationCommandUpdateRequest.md create mode 100644 docs/ApplicationCommandUserOption.md create mode 100644 docs/ApplicationCommandUserOptionResponse.md create mode 100644 docs/ApplicationFormPartial.md create mode 100644 docs/ApplicationFormPartialDescription.md create mode 100644 docs/ApplicationFormPartialIntegrationTypesConfigValue.md create mode 100644 docs/ApplicationIncomingWebhookResponse.md create mode 100644 docs/ApplicationIntegrationTypeConfiguration.md create mode 100644 docs/ApplicationIntegrationTypeConfigurationResponse.md create mode 100644 docs/ApplicationOAuth2InstallParams.md create mode 100644 docs/ApplicationOAuth2InstallParamsResponse.md create mode 100644 docs/ApplicationResponse.md create mode 100644 docs/ApplicationRoleConnectionsMetadataItemRequest.md create mode 100644 docs/ApplicationRoleConnectionsMetadataItemResponse.md create mode 100644 docs/ApplicationUserRoleConnectionResponse.md create mode 100644 docs/AttachmentResponse.md create mode 100644 docs/AuditLogEntryResponse.md create mode 100644 docs/AuditLogObjectChangeResponse.md create mode 100644 docs/BanUserFromGuildRequest.md create mode 100644 docs/BaseCreateMessageCreateRequest.md create mode 100644 docs/BaseCreateMessageCreateRequestComponentsInner.md create mode 100644 docs/BasicApplicationResponse.md create mode 100644 docs/BasicMessageResponse.md create mode 100644 docs/BasicMessageResponseComponentsInner.md create mode 100644 docs/BasicMessageResponseInteractionMetadata.md create mode 100644 docs/BasicMessageResponseNonce.md create mode 100644 docs/BlockMessageAction.md create mode 100644 docs/BlockMessageActionMetadata.md create mode 100644 docs/BlockMessageActionMetadataResponse.md create mode 100644 docs/BlockMessageActionResponse.md create mode 100644 docs/BotAccountPatchRequest.md create mode 100644 docs/BulkBanUsersFromGuildRequest.md create mode 100644 docs/BulkBanUsersResponse.md create mode 100644 docs/BulkDeleteMessagesRequest.md create mode 100644 docs/BulkLobbyMemberRequest.md create mode 100644 docs/BulkUpdateGuildChannelsRequestInner.md create mode 100644 docs/BulkUpdateGuildRolesRequestInner.md create mode 100644 docs/ButtonComponentForMessageRequest.md create mode 100644 docs/ButtonComponentResponse.md create mode 100644 docs/ChannelFollowerResponse.md create mode 100644 docs/ChannelFollowerWebhookResponse.md create mode 100644 docs/ChannelPermissionOverwriteRequest.md create mode 100644 docs/ChannelPermissionOverwriteResponse.md create mode 100644 docs/ChannelSelectComponentForMessageRequest.md create mode 100644 docs/ChannelSelectComponentResponse.md create mode 100644 docs/ChannelSelectDefaultValue.md create mode 100644 docs/ChannelSelectDefaultValueResponse.md create mode 100644 docs/CommandPermissionResponse.md create mode 100644 docs/CommandPermissionsResponse.md create mode 100644 docs/ComponentEmojiForMessageRequest.md create mode 100644 docs/ComponentEmojiResponse.md create mode 100644 docs/ConnectedAccountGuildResponse.md create mode 100644 docs/ConnectedAccountIntegrationResponse.md create mode 100644 docs/ConnectedAccountResponse.md create mode 100644 docs/ContainerComponentForMessageRequest.md create mode 100644 docs/ContainerComponentForMessageRequestComponentsInner.md create mode 100644 docs/ContainerComponentResponse.md create mode 100644 docs/ContainerComponentResponseComponentsInner.md create mode 100644 docs/CreateApplicationEmojiRequest.md create mode 100644 docs/CreateAutoModerationRule200Response.md create mode 100644 docs/CreateAutoModerationRuleRequest.md create mode 100644 docs/CreateChannelInviteRequest.md create mode 100644 docs/CreateEntitlementRequestData.md create mode 100644 docs/CreateForumThreadRequest.md create mode 100644 docs/CreateGroupDMInviteRequest.md create mode 100644 docs/CreateGuildChannelRequest.md create mode 100644 docs/CreateGuildEmojiRequest.md create mode 100644 docs/CreateGuildFromTemplateRequest.md create mode 100644 docs/CreateGuildInviteRequest.md create mode 100644 docs/CreateGuildRequestChannelItem.md create mode 100644 docs/CreateGuildRequestRoleItem.md create mode 100644 docs/CreateGuildRoleRequest.md create mode 100644 docs/CreateGuildScheduledEventRequest.md create mode 100644 docs/CreateGuildTemplateRequest.md create mode 100644 docs/CreateInteractionResponseRequest.md create mode 100644 docs/CreateLobbyRequest.md create mode 100644 docs/CreateMessageInteractionCallbackRequest.md create mode 100644 docs/CreateMessageInteractionCallbackResponse.md create mode 100644 docs/CreateOrJoinLobbyRequest.md create mode 100644 docs/CreateOrUpdateThreadTagRequest.md create mode 100644 docs/CreatePrivateChannelRequest.md create mode 100644 docs/CreateStageInstanceRequest.md create mode 100644 docs/CreateTextThreadWithMessageRequest.md create mode 100644 docs/CreateTextThreadWithoutMessageRequest.md create mode 100644 docs/CreateThreadRequest.md create mode 100644 docs/CreateWebhookRequest.md create mode 100644 docs/CreatedThreadResponse.md create mode 100644 docs/DefaultApi.md create mode 100644 docs/DefaultKeywordListTriggerMetadata.md create mode 100644 docs/DefaultKeywordListTriggerMetadataResponse.md create mode 100644 docs/DefaultKeywordListUpsertRequest.md create mode 100644 docs/DefaultKeywordListUpsertRequestActionsInner.md create mode 100644 docs/DefaultKeywordListUpsertRequestPartial.md create mode 100644 docs/DefaultKeywordRuleResponse.md create mode 100644 docs/DefaultKeywordRuleResponseActionsInner.md create mode 100644 docs/DefaultReactionEmojiResponse.md create mode 100644 docs/DiscordIntegrationResponse.md create mode 100644 docs/EditLobbyChannelLinkRequest.md create mode 100644 docs/EmbeddedActivityInstance.md create mode 100644 docs/EmbeddedActivityInstanceLocation.md create mode 100644 docs/EmojiResponse.md create mode 100644 docs/EntitlementResponse.md create mode 100644 docs/EntityMetadataExternal.md create mode 100644 docs/EntityMetadataExternalResponse.md create mode 100644 docs/Error.md create mode 100644 docs/ErrorDetails.md create mode 100644 docs/ErrorResponse.md create mode 100644 docs/ExecuteWebhookRequest.md create mode 100644 docs/ExternalConnectionIntegrationResponse.md create mode 100644 docs/ExternalScheduledEventCreateRequest.md create mode 100644 docs/ExternalScheduledEventPatchRequestPartial.md create mode 100644 docs/ExternalScheduledEventResponse.md create mode 100644 docs/FileComponentForMessageRequest.md create mode 100644 docs/FileComponentResponse.md create mode 100644 docs/FlagToChannelAction.md create mode 100644 docs/FlagToChannelActionMetadata.md create mode 100644 docs/FlagToChannelActionMetadataResponse.md create mode 100644 docs/FlagToChannelActionResponse.md create mode 100644 docs/FollowChannelRequest.md create mode 100644 docs/ForumTagResponse.md create mode 100644 docs/FriendInviteResponse.md create mode 100644 docs/GatewayBotResponse.md create mode 100644 docs/GatewayBotSessionStartLimitResponse.md create mode 100644 docs/GatewayResponse.md create mode 100644 docs/GetChannel200Response.md create mode 100644 docs/GetEntitlementsSkuIdsParameter.md create mode 100644 docs/GetSticker200Response.md create mode 100644 docs/GithubAuthor.md create mode 100644 docs/GithubCheckApp.md create mode 100644 docs/GithubCheckPullRequest.md create mode 100644 docs/GithubCheckRun.md create mode 100644 docs/GithubCheckRunOutput.md create mode 100644 docs/GithubCheckSuite.md create mode 100644 docs/GithubComment.md create mode 100644 docs/GithubCommit.md create mode 100644 docs/GithubDiscussion.md create mode 100644 docs/GithubIssue.md create mode 100644 docs/GithubRelease.md create mode 100644 docs/GithubRepository.md create mode 100644 docs/GithubReview.md create mode 100644 docs/GithubUser.md create mode 100644 docs/GithubWebhook.md create mode 100644 docs/GroupDMInviteResponse.md create mode 100644 docs/GuildAuditLogResponse.md create mode 100644 docs/GuildAuditLogResponseIntegrationsInner.md create mode 100644 docs/GuildBanResponse.md create mode 100644 docs/GuildChannelLocation.md create mode 100644 docs/GuildChannelResponse.md create mode 100644 docs/GuildCreateRequest.md create mode 100644 docs/GuildHomeSettingsResponse.md create mode 100644 docs/GuildIncomingWebhookResponse.md create mode 100644 docs/GuildInviteResponse.md create mode 100644 docs/GuildMFALevelResponse.md create mode 100644 docs/GuildMemberResponse.md create mode 100644 docs/GuildOnboardingResponse.md create mode 100644 docs/GuildPatchRequestPartial.md create mode 100644 docs/GuildPreviewResponse.md create mode 100644 docs/GuildProductPurchaseResponse.md create mode 100644 docs/GuildPruneResponse.md create mode 100644 docs/GuildResponse.md create mode 100644 docs/GuildRoleResponse.md create mode 100644 docs/GuildRoleTagsResponse.md create mode 100644 docs/GuildStickerResponse.md create mode 100644 docs/GuildSubscriptionIntegrationResponse.md create mode 100644 docs/GuildTemplateChannelResponse.md create mode 100644 docs/GuildTemplateChannelTags.md create mode 100644 docs/GuildTemplateResponse.md create mode 100644 docs/GuildTemplateRoleResponse.md create mode 100644 docs/GuildTemplateSnapshotResponse.md create mode 100644 docs/GuildWelcomeChannel.md create mode 100644 docs/GuildWelcomeScreenChannelResponse.md create mode 100644 docs/GuildWelcomeScreenResponse.md create mode 100644 docs/GuildWithCountsResponse.md create mode 100644 docs/IncomingWebhookInteractionRequest.md create mode 100644 docs/IncomingWebhookRequestPartial.md create mode 100644 docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md create mode 100644 docs/IncomingWebhookUpdateRequestPartial.md create mode 100644 docs/InnerErrors.md create mode 100644 docs/IntegrationApplicationResponse.md create mode 100644 docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md create mode 100644 docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md create mode 100644 docs/InteractionApplicationCommandAutocompleteCallbackStringData.md create mode 100644 docs/InteractionCallbackResponse.md create mode 100644 docs/InteractionCallbackResponseResource.md create mode 100644 docs/InteractionResponse.md create mode 100644 docs/InviteApplicationResponse.md create mode 100644 docs/InviteChannelRecipientResponse.md create mode 100644 docs/InviteChannelResponse.md create mode 100644 docs/InviteGuildResponse.md create mode 100644 docs/KeywordRuleResponse.md create mode 100644 docs/KeywordTriggerMetadata.md create mode 100644 docs/KeywordTriggerMetadataResponse.md create mode 100644 docs/KeywordUpsertRequest.md create mode 100644 docs/KeywordUpsertRequestPartial.md create mode 100644 docs/LaunchActivityInteractionCallbackRequest.md create mode 100644 docs/LaunchActivityInteractionCallbackResponse.md create mode 100644 docs/ListApplicationEmojisResponse.md create mode 100644 docs/ListAutoModerationRules200ResponseInner.md create mode 100644 docs/ListChannelInvites200ResponseInner.md create mode 100644 docs/ListChannelWebhooks200ResponseInner.md create mode 100644 docs/ListGuildIntegrations200ResponseInner.md create mode 100644 docs/ListGuildScheduledEvents200ResponseInner.md create mode 100644 docs/ListGuildSoundboardSoundsResponse.md create mode 100644 docs/LobbyMemberRequest.md create mode 100644 docs/LobbyMemberResponse.md create mode 100644 docs/LobbyMessageResponse.md create mode 100644 docs/LobbyResponse.md create mode 100644 docs/MLSpamRuleResponse.md create mode 100644 docs/MLSpamUpsertRequest.md create mode 100644 docs/MLSpamUpsertRequestPartial.md create mode 100644 docs/MediaGalleryComponentForMessageRequest.md create mode 100644 docs/MediaGalleryComponentResponse.md create mode 100644 docs/MediaGalleryItemRequest.md create mode 100644 docs/MediaGalleryItemResponse.md create mode 100644 docs/MentionSpamRuleResponse.md create mode 100644 docs/MentionSpamTriggerMetadata.md create mode 100644 docs/MentionSpamTriggerMetadataResponse.md create mode 100644 docs/MentionSpamUpsertRequest.md create mode 100644 docs/MentionSpamUpsertRequestPartial.md create mode 100644 docs/MentionableSelectComponentForMessageRequest.md create mode 100644 docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md create mode 100644 docs/MentionableSelectComponentResponse.md create mode 100644 docs/MentionableSelectComponentResponseDefaultValuesInner.md create mode 100644 docs/MessageAllowedMentionsRequest.md create mode 100644 docs/MessageAttachmentRequest.md create mode 100644 docs/MessageAttachmentResponse.md create mode 100644 docs/MessageCallResponse.md create mode 100644 docs/MessageComponentInteractionMetadataResponse.md create mode 100644 docs/MessageCreateRequest.md create mode 100644 docs/MessageEditRequestPartial.md create mode 100644 docs/MessageEmbedAuthorResponse.md create mode 100644 docs/MessageEmbedFieldResponse.md create mode 100644 docs/MessageEmbedFooterResponse.md create mode 100644 docs/MessageEmbedImageResponse.md create mode 100644 docs/MessageEmbedProviderResponse.md create mode 100644 docs/MessageEmbedResponse.md create mode 100644 docs/MessageEmbedVideoResponse.md create mode 100644 docs/MessageInteractionResponse.md create mode 100644 docs/MessageMentionChannelResponse.md create mode 100644 docs/MessageReactionCountDetailsResponse.md create mode 100644 docs/MessageReactionEmojiResponse.md create mode 100644 docs/MessageReactionResponse.md create mode 100644 docs/MessageReferenceRequest.md create mode 100644 docs/MessageReferenceResponse.md create mode 100644 docs/MessageResponse.md create mode 100644 docs/MessageRoleSubscriptionDataResponse.md create mode 100644 docs/MessageSnapshotResponse.md create mode 100644 docs/MessageStickerItemResponse.md create mode 100644 docs/MinimalContentMessageResponse.md create mode 100644 docs/ModalInteractionCallbackRequest.md create mode 100644 docs/ModalInteractionCallbackRequestData.md create mode 100644 docs/ModalSubmitInteractionMetadataResponse.md create mode 100644 docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md create mode 100644 docs/MyGuildResponse.md create mode 100644 docs/NewMemberActionResponse.md create mode 100644 docs/OAuth2GetAuthorizationResponse.md create mode 100644 docs/OAuth2GetKeys.md create mode 100644 docs/OAuth2GetOpenIDConnectUserInfoResponse.md create mode 100644 docs/OAuth2Key.md create mode 100644 docs/OnboardingPromptOptionRequest.md create mode 100644 docs/OnboardingPromptOptionResponse.md create mode 100644 docs/OnboardingPromptResponse.md create mode 100644 docs/PartialDiscordIntegrationResponse.md create mode 100644 docs/PartialExternalConnectionIntegrationResponse.md create mode 100644 docs/PartialGuildSubscriptionIntegrationResponse.md create mode 100644 docs/PartnerSdkUnmergeProvisionalAccountRequest.md create mode 100644 docs/PinnedMessageResponse.md create mode 100644 docs/PinnedMessagesResponse.md create mode 100644 docs/PollAnswerCreateRequest.md create mode 100644 docs/PollAnswerDetailsResponse.md create mode 100644 docs/PollAnswerResponse.md create mode 100644 docs/PollCreateRequest.md create mode 100644 docs/PollEmoji.md create mode 100644 docs/PollEmojiCreateRequest.md create mode 100644 docs/PollMedia.md create mode 100644 docs/PollMediaCreateRequest.md create mode 100644 docs/PollMediaResponse.md create mode 100644 docs/PollResponse.md create mode 100644 docs/PollResultsEntryResponse.md create mode 100644 docs/PollResultsResponse.md create mode 100644 docs/PongInteractionCallbackRequest.md create mode 100644 docs/PrivateApplicationResponse.md create mode 100644 docs/PrivateChannelLocation.md create mode 100644 docs/PrivateChannelResponse.md create mode 100644 docs/PrivateGroupChannelResponse.md create mode 100644 docs/PrivateGuildMemberResponse.md create mode 100644 docs/ProvisionalTokenResponse.md create mode 100644 docs/PruneGuildRequest.md create mode 100644 docs/PruneGuildRequestIncludeRoles.md create mode 100644 docs/PurchaseNotificationResponse.md create mode 100644 docs/QuarantineUserAction.md create mode 100644 docs/QuarantineUserActionResponse.md create mode 100644 docs/ResolvedObjectsResponse.md create mode 100644 docs/ResourceChannelResponse.md create mode 100644 docs/RichEmbed.md create mode 100644 docs/RichEmbedAuthor.md create mode 100644 docs/RichEmbedField.md create mode 100644 docs/RichEmbedFooter.md create mode 100644 docs/RichEmbedImage.md create mode 100644 docs/RichEmbedProvider.md create mode 100644 docs/RichEmbedThumbnail.md create mode 100644 docs/RichEmbedVideo.md create mode 100644 docs/RoleSelectComponentForMessageRequest.md create mode 100644 docs/RoleSelectComponentResponse.md create mode 100644 docs/RoleSelectDefaultValue.md create mode 100644 docs/RoleSelectDefaultValueResponse.md create mode 100644 docs/SDKMessageRequest.md create mode 100644 docs/ScheduledEventResponse.md create mode 100644 docs/ScheduledEventUserResponse.md create mode 100644 docs/SectionComponentForMessageRequest.md create mode 100644 docs/SectionComponentForMessageRequestAccessory.md create mode 100644 docs/SectionComponentResponse.md create mode 100644 docs/SectionComponentResponseAccessory.md create mode 100644 docs/SeparatorComponentForMessageRequest.md create mode 100644 docs/SeparatorComponentResponse.md create mode 100644 docs/SetChannelPermissionOverwriteRequest.md create mode 100644 docs/SetGuildApplicationCommandPermissionsRequest.md create mode 100644 docs/SetGuildMfaLevelRequest.md create mode 100644 docs/SettingsEmojiResponse.md create mode 100644 docs/SlackWebhook.md create mode 100644 docs/SoundboardCreateRequest.md create mode 100644 docs/SoundboardPatchRequestPartial.md create mode 100644 docs/SoundboardSoundResponse.md create mode 100644 docs/SoundboardSoundSendRequest.md create mode 100644 docs/SpamLinkRuleResponse.md create mode 100644 docs/StageInstanceResponse.md create mode 100644 docs/StageScheduledEventCreateRequest.md create mode 100644 docs/StageScheduledEventPatchRequestPartial.md create mode 100644 docs/StageScheduledEventResponse.md create mode 100644 docs/StandardStickerResponse.md create mode 100644 docs/StickerPackCollectionResponse.md create mode 100644 docs/StickerPackResponse.md create mode 100644 docs/StringSelectComponentForMessageRequest.md create mode 100644 docs/StringSelectComponentResponse.md create mode 100644 docs/StringSelectOptionForMessageRequest.md create mode 100644 docs/StringSelectOptionResponse.md create mode 100644 docs/TeamMemberResponse.md create mode 100644 docs/TeamResponse.md create mode 100644 docs/TextDisplayComponentForMessageRequest.md create mode 100644 docs/TextDisplayComponentResponse.md create mode 100644 docs/TextInputComponentForModalRequest.md create mode 100644 docs/TextInputComponentResponse.md create mode 100644 docs/ThreadMemberResponse.md create mode 100644 docs/ThreadMetadataResponse.md create mode 100644 docs/ThreadResponse.md create mode 100644 docs/ThreadSearchResponse.md create mode 100644 docs/ThreadSearchTagParameter.md create mode 100644 docs/ThreadsResponse.md create mode 100644 docs/ThumbnailComponentForMessageRequest.md create mode 100644 docs/ThumbnailComponentResponse.md create mode 100644 docs/UnfurledMediaRequest.md create mode 100644 docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md create mode 100644 docs/UnfurledMediaResponse.md create mode 100644 docs/UpdateApplicationEmojiRequest.md create mode 100644 docs/UpdateApplicationUserRoleConnectionRequest.md create mode 100644 docs/UpdateAutoModerationRuleRequest.md create mode 100644 docs/UpdateChannelRequest.md create mode 100644 docs/UpdateDMRequestPartial.md create mode 100644 docs/UpdateDefaultReactionEmojiRequest.md create mode 100644 docs/UpdateGroupDMRequestPartial.md create mode 100644 docs/UpdateGuildChannelRequestPartial.md create mode 100644 docs/UpdateGuildEmojiRequest.md create mode 100644 docs/UpdateGuildMemberRequest.md create mode 100644 docs/UpdateGuildOnboardingRequest.md create mode 100644 docs/UpdateGuildScheduledEventRequest.md create mode 100644 docs/UpdateGuildStickerRequest.md create mode 100644 docs/UpdateGuildTemplateRequest.md create mode 100644 docs/UpdateGuildWidgetSettingsRequest.md create mode 100644 docs/UpdateMessageInteractionCallbackRequest.md create mode 100644 docs/UpdateMessageInteractionCallbackResponse.md create mode 100644 docs/UpdateMyGuildMemberRequest.md create mode 100644 docs/UpdateOnboardingPromptRequest.md create mode 100644 docs/UpdateSelfVoiceStateRequest.md create mode 100644 docs/UpdateStageInstanceRequest.md create mode 100644 docs/UpdateThreadRequestPartial.md create mode 100644 docs/UpdateThreadTagRequest.md create mode 100644 docs/UpdateVoiceStateRequest.md create mode 100644 docs/UpdateWebhookByTokenRequest.md create mode 100644 docs/UpdateWebhookRequest.md create mode 100644 docs/UserAvatarDecorationResponse.md create mode 100644 docs/UserCollectiblesResponse.md create mode 100644 docs/UserCommunicationDisabledAction.md create mode 100644 docs/UserCommunicationDisabledActionMetadata.md create mode 100644 docs/UserCommunicationDisabledActionMetadataResponse.md create mode 100644 docs/UserCommunicationDisabledActionResponse.md create mode 100644 docs/UserGuildOnboardingResponse.md create mode 100644 docs/UserNameplateResponse.md create mode 100644 docs/UserPIIResponse.md create mode 100644 docs/UserPrimaryGuildResponse.md create mode 100644 docs/UserResponse.md create mode 100644 docs/UserSelectComponentForMessageRequest.md create mode 100644 docs/UserSelectComponentResponse.md create mode 100644 docs/UserSelectDefaultValue.md create mode 100644 docs/UserSelectDefaultValueResponse.md create mode 100644 docs/VanityURLErrorResponse.md create mode 100644 docs/VanityURLResponse.md create mode 100644 docs/VoiceRegionResponse.md create mode 100644 docs/VoiceScheduledEventCreateRequest.md create mode 100644 docs/VoiceScheduledEventPatchRequestPartial.md create mode 100644 docs/VoiceScheduledEventResponse.md create mode 100644 docs/VoiceStateResponse.md create mode 100644 docs/WebhookSlackEmbed.md create mode 100644 docs/WebhookSlackEmbedField.md create mode 100644 docs/WebhookSourceChannelResponse.md create mode 100644 docs/WebhookSourceGuildResponse.md create mode 100644 docs/WelcomeMessageResponse.md create mode 100644 docs/WelcomeScreenPatchRequestPartial.md create mode 100644 docs/WidgetActivity.md create mode 100644 docs/WidgetChannel.md create mode 100644 docs/WidgetMember.md create mode 100644 docs/WidgetResponse.md create mode 100644 docs/WidgetSettingsResponse.md create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 test/__init__.py create mode 100644 test/test_account_response.py create mode 100644 test/test_action_row_component_for_message_request.py create mode 100644 test/test_action_row_component_for_message_request_components_inner.py create mode 100644 test/test_action_row_component_for_modal_request.py create mode 100644 test/test_action_row_component_response.py create mode 100644 test/test_action_row_component_response_components_inner.py create mode 100644 test/test_activities_attachment_response.py create mode 100644 test/test_add_group_dm_user201_response.py create mode 100644 test/test_add_group_dm_user_request.py create mode 100644 test/test_add_guild_member_request.py create mode 100644 test/test_add_lobby_member_request.py create mode 100644 test/test_application_command_attachment_option.py create mode 100644 test/test_application_command_attachment_option_response.py create mode 100644 test/test_application_command_autocomplete_callback_request.py create mode 100644 test/test_application_command_autocomplete_callback_request_data.py create mode 100644 test/test_application_command_boolean_option.py create mode 100644 test/test_application_command_boolean_option_response.py create mode 100644 test/test_application_command_channel_option.py create mode 100644 test/test_application_command_channel_option_response.py create mode 100644 test/test_application_command_create_request.py create mode 100644 test/test_application_command_create_request_options_inner.py create mode 100644 test/test_application_command_integer_option.py create mode 100644 test/test_application_command_integer_option_response.py create mode 100644 test/test_application_command_interaction_metadata_response.py create mode 100644 test/test_application_command_mentionable_option.py create mode 100644 test/test_application_command_mentionable_option_response.py create mode 100644 test/test_application_command_number_option.py create mode 100644 test/test_application_command_number_option_response.py create mode 100644 test/test_application_command_option_integer_choice.py create mode 100644 test/test_application_command_option_integer_choice_response.py create mode 100644 test/test_application_command_option_number_choice.py create mode 100644 test/test_application_command_option_number_choice_response.py create mode 100644 test/test_application_command_option_string_choice.py create mode 100644 test/test_application_command_option_string_choice_response.py create mode 100644 test/test_application_command_patch_request_partial.py create mode 100644 test/test_application_command_permission.py create mode 100644 test/test_application_command_response.py create mode 100644 test/test_application_command_response_options_inner.py create mode 100644 test/test_application_command_role_option.py create mode 100644 test/test_application_command_role_option_response.py create mode 100644 test/test_application_command_string_option.py create mode 100644 test/test_application_command_string_option_response.py create mode 100644 test/test_application_command_subcommand_group_option.py create mode 100644 test/test_application_command_subcommand_group_option_response.py create mode 100644 test/test_application_command_subcommand_option.py create mode 100644 test/test_application_command_subcommand_option_options_inner.py create mode 100644 test/test_application_command_subcommand_option_response.py create mode 100644 test/test_application_command_subcommand_option_response_options_inner.py create mode 100644 test/test_application_command_update_request.py create mode 100644 test/test_application_command_user_option.py create mode 100644 test/test_application_command_user_option_response.py create mode 100644 test/test_application_form_partial.py create mode 100644 test/test_application_form_partial_description.py create mode 100644 test/test_application_form_partial_integration_types_config_value.py create mode 100644 test/test_application_incoming_webhook_response.py create mode 100644 test/test_application_integration_type_configuration.py create mode 100644 test/test_application_integration_type_configuration_response.py create mode 100644 test/test_application_o_auth2_install_params.py create mode 100644 test/test_application_o_auth2_install_params_response.py create mode 100644 test/test_application_response.py create mode 100644 test/test_application_role_connections_metadata_item_request.py create mode 100644 test/test_application_role_connections_metadata_item_response.py create mode 100644 test/test_application_user_role_connection_response.py create mode 100644 test/test_attachment_response.py create mode 100644 test/test_audit_log_entry_response.py create mode 100644 test/test_audit_log_object_change_response.py create mode 100644 test/test_ban_user_from_guild_request.py create mode 100644 test/test_base_create_message_create_request.py create mode 100644 test/test_base_create_message_create_request_components_inner.py create mode 100644 test/test_basic_application_response.py create mode 100644 test/test_basic_message_response.py create mode 100644 test/test_basic_message_response_components_inner.py create mode 100644 test/test_basic_message_response_interaction_metadata.py create mode 100644 test/test_basic_message_response_nonce.py create mode 100644 test/test_block_message_action.py create mode 100644 test/test_block_message_action_metadata.py create mode 100644 test/test_block_message_action_metadata_response.py create mode 100644 test/test_block_message_action_response.py create mode 100644 test/test_bot_account_patch_request.py create mode 100644 test/test_bulk_ban_users_from_guild_request.py create mode 100644 test/test_bulk_ban_users_response.py create mode 100644 test/test_bulk_delete_messages_request.py create mode 100644 test/test_bulk_lobby_member_request.py create mode 100644 test/test_bulk_update_guild_channels_request_inner.py create mode 100644 test/test_bulk_update_guild_roles_request_inner.py create mode 100644 test/test_button_component_for_message_request.py create mode 100644 test/test_button_component_response.py create mode 100644 test/test_channel_follower_response.py create mode 100644 test/test_channel_follower_webhook_response.py create mode 100644 test/test_channel_permission_overwrite_request.py create mode 100644 test/test_channel_permission_overwrite_response.py create mode 100644 test/test_channel_select_component_for_message_request.py create mode 100644 test/test_channel_select_component_response.py create mode 100644 test/test_channel_select_default_value.py create mode 100644 test/test_channel_select_default_value_response.py create mode 100644 test/test_command_permission_response.py create mode 100644 test/test_command_permissions_response.py create mode 100644 test/test_component_emoji_for_message_request.py create mode 100644 test/test_component_emoji_response.py create mode 100644 test/test_connected_account_guild_response.py create mode 100644 test/test_connected_account_integration_response.py create mode 100644 test/test_connected_account_response.py create mode 100644 test/test_container_component_for_message_request.py create mode 100644 test/test_container_component_for_message_request_components_inner.py create mode 100644 test/test_container_component_response.py create mode 100644 test/test_container_component_response_components_inner.py create mode 100644 test/test_create_application_emoji_request.py create mode 100644 test/test_create_auto_moderation_rule200_response.py create mode 100644 test/test_create_auto_moderation_rule_request.py create mode 100644 test/test_create_channel_invite_request.py create mode 100644 test/test_create_entitlement_request_data.py create mode 100644 test/test_create_forum_thread_request.py create mode 100644 test/test_create_group_dm_invite_request.py create mode 100644 test/test_create_guild_channel_request.py create mode 100644 test/test_create_guild_emoji_request.py create mode 100644 test/test_create_guild_from_template_request.py create mode 100644 test/test_create_guild_invite_request.py create mode 100644 test/test_create_guild_request_channel_item.py create mode 100644 test/test_create_guild_request_role_item.py create mode 100644 test/test_create_guild_role_request.py create mode 100644 test/test_create_guild_scheduled_event_request.py create mode 100644 test/test_create_guild_template_request.py create mode 100644 test/test_create_interaction_response_request.py create mode 100644 test/test_create_lobby_request.py create mode 100644 test/test_create_message_interaction_callback_request.py create mode 100644 test/test_create_message_interaction_callback_response.py create mode 100644 test/test_create_or_join_lobby_request.py create mode 100644 test/test_create_or_update_thread_tag_request.py create mode 100644 test/test_create_private_channel_request.py create mode 100644 test/test_create_stage_instance_request.py create mode 100644 test/test_create_text_thread_with_message_request.py create mode 100644 test/test_create_text_thread_without_message_request.py create mode 100644 test/test_create_thread_request.py create mode 100644 test/test_create_webhook_request.py create mode 100644 test/test_created_thread_response.py create mode 100644 test/test_default_api.py create mode 100644 test/test_default_keyword_list_trigger_metadata.py create mode 100644 test/test_default_keyword_list_trigger_metadata_response.py create mode 100644 test/test_default_keyword_list_upsert_request.py create mode 100644 test/test_default_keyword_list_upsert_request_actions_inner.py create mode 100644 test/test_default_keyword_list_upsert_request_partial.py create mode 100644 test/test_default_keyword_rule_response.py create mode 100644 test/test_default_keyword_rule_response_actions_inner.py create mode 100644 test/test_default_reaction_emoji_response.py create mode 100644 test/test_discord_integration_response.py create mode 100644 test/test_edit_lobby_channel_link_request.py create mode 100644 test/test_embedded_activity_instance.py create mode 100644 test/test_embedded_activity_instance_location.py create mode 100644 test/test_emoji_response.py create mode 100644 test/test_entitlement_response.py create mode 100644 test/test_entity_metadata_external.py create mode 100644 test/test_entity_metadata_external_response.py create mode 100644 test/test_error.py create mode 100644 test/test_error_details.py create mode 100644 test/test_error_response.py create mode 100644 test/test_execute_webhook_request.py create mode 100644 test/test_external_connection_integration_response.py create mode 100644 test/test_external_scheduled_event_create_request.py create mode 100644 test/test_external_scheduled_event_patch_request_partial.py create mode 100644 test/test_external_scheduled_event_response.py create mode 100644 test/test_file_component_for_message_request.py create mode 100644 test/test_file_component_response.py create mode 100644 test/test_flag_to_channel_action.py create mode 100644 test/test_flag_to_channel_action_metadata.py create mode 100644 test/test_flag_to_channel_action_metadata_response.py create mode 100644 test/test_flag_to_channel_action_response.py create mode 100644 test/test_follow_channel_request.py create mode 100644 test/test_forum_tag_response.py create mode 100644 test/test_friend_invite_response.py create mode 100644 test/test_gateway_bot_response.py create mode 100644 test/test_gateway_bot_session_start_limit_response.py create mode 100644 test/test_gateway_response.py create mode 100644 test/test_get_channel200_response.py create mode 100644 test/test_get_entitlements_sku_ids_parameter.py create mode 100644 test/test_get_sticker200_response.py create mode 100644 test/test_github_author.py create mode 100644 test/test_github_check_app.py create mode 100644 test/test_github_check_pull_request.py create mode 100644 test/test_github_check_run.py create mode 100644 test/test_github_check_run_output.py create mode 100644 test/test_github_check_suite.py create mode 100644 test/test_github_comment.py create mode 100644 test/test_github_commit.py create mode 100644 test/test_github_discussion.py create mode 100644 test/test_github_issue.py create mode 100644 test/test_github_release.py create mode 100644 test/test_github_repository.py create mode 100644 test/test_github_review.py create mode 100644 test/test_github_user.py create mode 100644 test/test_github_webhook.py create mode 100644 test/test_group_dm_invite_response.py create mode 100644 test/test_guild_audit_log_response.py create mode 100644 test/test_guild_audit_log_response_integrations_inner.py create mode 100644 test/test_guild_ban_response.py create mode 100644 test/test_guild_channel_location.py create mode 100644 test/test_guild_channel_response.py create mode 100644 test/test_guild_create_request.py create mode 100644 test/test_guild_home_settings_response.py create mode 100644 test/test_guild_incoming_webhook_response.py create mode 100644 test/test_guild_invite_response.py create mode 100644 test/test_guild_member_response.py create mode 100644 test/test_guild_mfa_level_response.py create mode 100644 test/test_guild_onboarding_response.py create mode 100644 test/test_guild_patch_request_partial.py create mode 100644 test/test_guild_preview_response.py create mode 100644 test/test_guild_product_purchase_response.py create mode 100644 test/test_guild_prune_response.py create mode 100644 test/test_guild_response.py create mode 100644 test/test_guild_role_response.py create mode 100644 test/test_guild_role_tags_response.py create mode 100644 test/test_guild_sticker_response.py create mode 100644 test/test_guild_subscription_integration_response.py create mode 100644 test/test_guild_template_channel_response.py create mode 100644 test/test_guild_template_channel_tags.py create mode 100644 test/test_guild_template_response.py create mode 100644 test/test_guild_template_role_response.py create mode 100644 test/test_guild_template_snapshot_response.py create mode 100644 test/test_guild_welcome_channel.py create mode 100644 test/test_guild_welcome_screen_channel_response.py create mode 100644 test/test_guild_welcome_screen_response.py create mode 100644 test/test_guild_with_counts_response.py create mode 100644 test/test_incoming_webhook_interaction_request.py create mode 100644 test/test_incoming_webhook_request_partial.py create mode 100644 test/test_incoming_webhook_update_for_interaction_callback_request_partial.py create mode 100644 test/test_incoming_webhook_update_request_partial.py create mode 100644 test/test_inner_errors.py create mode 100644 test/test_integration_application_response.py create mode 100644 test/test_interaction_application_command_autocomplete_callback_integer_data.py create mode 100644 test/test_interaction_application_command_autocomplete_callback_number_data.py create mode 100644 test/test_interaction_application_command_autocomplete_callback_string_data.py create mode 100644 test/test_interaction_callback_response.py create mode 100644 test/test_interaction_callback_response_resource.py create mode 100644 test/test_interaction_response.py create mode 100644 test/test_invite_application_response.py create mode 100644 test/test_invite_channel_recipient_response.py create mode 100644 test/test_invite_channel_response.py create mode 100644 test/test_invite_guild_response.py create mode 100644 test/test_keyword_rule_response.py create mode 100644 test/test_keyword_trigger_metadata.py create mode 100644 test/test_keyword_trigger_metadata_response.py create mode 100644 test/test_keyword_upsert_request.py create mode 100644 test/test_keyword_upsert_request_partial.py create mode 100644 test/test_launch_activity_interaction_callback_request.py create mode 100644 test/test_launch_activity_interaction_callback_response.py create mode 100644 test/test_list_application_emojis_response.py create mode 100644 test/test_list_auto_moderation_rules200_response_inner.py create mode 100644 test/test_list_channel_invites200_response_inner.py create mode 100644 test/test_list_channel_webhooks200_response_inner.py create mode 100644 test/test_list_guild_integrations200_response_inner.py create mode 100644 test/test_list_guild_scheduled_events200_response_inner.py create mode 100644 test/test_list_guild_soundboard_sounds_response.py create mode 100644 test/test_lobby_member_request.py create mode 100644 test/test_lobby_member_response.py create mode 100644 test/test_lobby_message_response.py create mode 100644 test/test_lobby_response.py create mode 100644 test/test_media_gallery_component_for_message_request.py create mode 100644 test/test_media_gallery_component_response.py create mode 100644 test/test_media_gallery_item_request.py create mode 100644 test/test_media_gallery_item_response.py create mode 100644 test/test_mention_spam_rule_response.py create mode 100644 test/test_mention_spam_trigger_metadata.py create mode 100644 test/test_mention_spam_trigger_metadata_response.py create mode 100644 test/test_mention_spam_upsert_request.py create mode 100644 test/test_mention_spam_upsert_request_partial.py create mode 100644 test/test_mentionable_select_component_for_message_request.py create mode 100644 test/test_mentionable_select_component_for_message_request_default_values_inner.py create mode 100644 test/test_mentionable_select_component_response.py create mode 100644 test/test_mentionable_select_component_response_default_values_inner.py create mode 100644 test/test_message_allowed_mentions_request.py create mode 100644 test/test_message_attachment_request.py create mode 100644 test/test_message_attachment_response.py create mode 100644 test/test_message_call_response.py create mode 100644 test/test_message_component_interaction_metadata_response.py create mode 100644 test/test_message_create_request.py create mode 100644 test/test_message_edit_request_partial.py create mode 100644 test/test_message_embed_author_response.py create mode 100644 test/test_message_embed_field_response.py create mode 100644 test/test_message_embed_footer_response.py create mode 100644 test/test_message_embed_image_response.py create mode 100644 test/test_message_embed_provider_response.py create mode 100644 test/test_message_embed_response.py create mode 100644 test/test_message_embed_video_response.py create mode 100644 test/test_message_interaction_response.py create mode 100644 test/test_message_mention_channel_response.py create mode 100644 test/test_message_reaction_count_details_response.py create mode 100644 test/test_message_reaction_emoji_response.py create mode 100644 test/test_message_reaction_response.py create mode 100644 test/test_message_reference_request.py create mode 100644 test/test_message_reference_response.py create mode 100644 test/test_message_response.py create mode 100644 test/test_message_role_subscription_data_response.py create mode 100644 test/test_message_snapshot_response.py create mode 100644 test/test_message_sticker_item_response.py create mode 100644 test/test_minimal_content_message_response.py create mode 100644 test/test_ml_spam_rule_response.py create mode 100644 test/test_ml_spam_upsert_request.py create mode 100644 test/test_ml_spam_upsert_request_partial.py create mode 100644 test/test_modal_interaction_callback_request.py create mode 100644 test/test_modal_interaction_callback_request_data.py create mode 100644 test/test_modal_submit_interaction_metadata_response.py create mode 100644 test/test_modal_submit_interaction_metadata_response_triggering_interaction_metadata.py create mode 100644 test/test_my_guild_response.py create mode 100644 test/test_new_member_action_response.py create mode 100644 test/test_o_auth2_get_authorization_response.py create mode 100644 test/test_o_auth2_get_keys.py create mode 100644 test/test_o_auth2_get_open_id_connect_user_info_response.py create mode 100644 test/test_o_auth2_key.py create mode 100644 test/test_onboarding_prompt_option_request.py create mode 100644 test/test_onboarding_prompt_option_response.py create mode 100644 test/test_onboarding_prompt_response.py create mode 100644 test/test_partial_discord_integration_response.py create mode 100644 test/test_partial_external_connection_integration_response.py create mode 100644 test/test_partial_guild_subscription_integration_response.py create mode 100644 test/test_partner_sdk_unmerge_provisional_account_request.py create mode 100644 test/test_pinned_message_response.py create mode 100644 test/test_pinned_messages_response.py create mode 100644 test/test_poll_answer_create_request.py create mode 100644 test/test_poll_answer_details_response.py create mode 100644 test/test_poll_answer_response.py create mode 100644 test/test_poll_create_request.py create mode 100644 test/test_poll_emoji.py create mode 100644 test/test_poll_emoji_create_request.py create mode 100644 test/test_poll_media.py create mode 100644 test/test_poll_media_create_request.py create mode 100644 test/test_poll_media_response.py create mode 100644 test/test_poll_response.py create mode 100644 test/test_poll_results_entry_response.py create mode 100644 test/test_poll_results_response.py create mode 100644 test/test_pong_interaction_callback_request.py create mode 100644 test/test_private_application_response.py create mode 100644 test/test_private_channel_location.py create mode 100644 test/test_private_channel_response.py create mode 100644 test/test_private_group_channel_response.py create mode 100644 test/test_private_guild_member_response.py create mode 100644 test/test_provisional_token_response.py create mode 100644 test/test_prune_guild_request.py create mode 100644 test/test_prune_guild_request_include_roles.py create mode 100644 test/test_purchase_notification_response.py create mode 100644 test/test_quarantine_user_action.py create mode 100644 test/test_quarantine_user_action_response.py create mode 100644 test/test_resolved_objects_response.py create mode 100644 test/test_resource_channel_response.py create mode 100644 test/test_rich_embed.py create mode 100644 test/test_rich_embed_author.py create mode 100644 test/test_rich_embed_field.py create mode 100644 test/test_rich_embed_footer.py create mode 100644 test/test_rich_embed_image.py create mode 100644 test/test_rich_embed_provider.py create mode 100644 test/test_rich_embed_thumbnail.py create mode 100644 test/test_rich_embed_video.py create mode 100644 test/test_role_select_component_for_message_request.py create mode 100644 test/test_role_select_component_response.py create mode 100644 test/test_role_select_default_value.py create mode 100644 test/test_role_select_default_value_response.py create mode 100644 test/test_scheduled_event_response.py create mode 100644 test/test_scheduled_event_user_response.py create mode 100644 test/test_sdk_message_request.py create mode 100644 test/test_section_component_for_message_request.py create mode 100644 test/test_section_component_for_message_request_accessory.py create mode 100644 test/test_section_component_response.py create mode 100644 test/test_section_component_response_accessory.py create mode 100644 test/test_separator_component_for_message_request.py create mode 100644 test/test_separator_component_response.py create mode 100644 test/test_set_channel_permission_overwrite_request.py create mode 100644 test/test_set_guild_application_command_permissions_request.py create mode 100644 test/test_set_guild_mfa_level_request.py create mode 100644 test/test_settings_emoji_response.py create mode 100644 test/test_slack_webhook.py create mode 100644 test/test_soundboard_create_request.py create mode 100644 test/test_soundboard_patch_request_partial.py create mode 100644 test/test_soundboard_sound_response.py create mode 100644 test/test_soundboard_sound_send_request.py create mode 100644 test/test_spam_link_rule_response.py create mode 100644 test/test_stage_instance_response.py create mode 100644 test/test_stage_scheduled_event_create_request.py create mode 100644 test/test_stage_scheduled_event_patch_request_partial.py create mode 100644 test/test_stage_scheduled_event_response.py create mode 100644 test/test_standard_sticker_response.py create mode 100644 test/test_sticker_pack_collection_response.py create mode 100644 test/test_sticker_pack_response.py create mode 100644 test/test_string_select_component_for_message_request.py create mode 100644 test/test_string_select_component_response.py create mode 100644 test/test_string_select_option_for_message_request.py create mode 100644 test/test_string_select_option_response.py create mode 100644 test/test_team_member_response.py create mode 100644 test/test_team_response.py create mode 100644 test/test_text_display_component_for_message_request.py create mode 100644 test/test_text_display_component_response.py create mode 100644 test/test_text_input_component_for_modal_request.py create mode 100644 test/test_text_input_component_response.py create mode 100644 test/test_thread_member_response.py create mode 100644 test/test_thread_metadata_response.py create mode 100644 test/test_thread_response.py create mode 100644 test/test_thread_search_response.py create mode 100644 test/test_thread_search_tag_parameter.py create mode 100644 test/test_threads_response.py create mode 100644 test/test_thumbnail_component_for_message_request.py create mode 100644 test/test_thumbnail_component_response.py create mode 100644 test/test_unfurled_media_request.py create mode 100644 test/test_unfurled_media_request_with_attachment_reference_required.py create mode 100644 test/test_unfurled_media_response.py create mode 100644 test/test_update_application_emoji_request.py create mode 100644 test/test_update_application_user_role_connection_request.py create mode 100644 test/test_update_auto_moderation_rule_request.py create mode 100644 test/test_update_channel_request.py create mode 100644 test/test_update_default_reaction_emoji_request.py create mode 100644 test/test_update_dm_request_partial.py create mode 100644 test/test_update_group_dm_request_partial.py create mode 100644 test/test_update_guild_channel_request_partial.py create mode 100644 test/test_update_guild_emoji_request.py create mode 100644 test/test_update_guild_member_request.py create mode 100644 test/test_update_guild_onboarding_request.py create mode 100644 test/test_update_guild_scheduled_event_request.py create mode 100644 test/test_update_guild_sticker_request.py create mode 100644 test/test_update_guild_template_request.py create mode 100644 test/test_update_guild_widget_settings_request.py create mode 100644 test/test_update_message_interaction_callback_request.py create mode 100644 test/test_update_message_interaction_callback_response.py create mode 100644 test/test_update_my_guild_member_request.py create mode 100644 test/test_update_onboarding_prompt_request.py create mode 100644 test/test_update_self_voice_state_request.py create mode 100644 test/test_update_stage_instance_request.py create mode 100644 test/test_update_thread_request_partial.py create mode 100644 test/test_update_thread_tag_request.py create mode 100644 test/test_update_voice_state_request.py create mode 100644 test/test_update_webhook_by_token_request.py create mode 100644 test/test_update_webhook_request.py create mode 100644 test/test_user_avatar_decoration_response.py create mode 100644 test/test_user_collectibles_response.py create mode 100644 test/test_user_communication_disabled_action.py create mode 100644 test/test_user_communication_disabled_action_metadata.py create mode 100644 test/test_user_communication_disabled_action_metadata_response.py create mode 100644 test/test_user_communication_disabled_action_response.py create mode 100644 test/test_user_guild_onboarding_response.py create mode 100644 test/test_user_nameplate_response.py create mode 100644 test/test_user_pii_response.py create mode 100644 test/test_user_primary_guild_response.py create mode 100644 test/test_user_response.py create mode 100644 test/test_user_select_component_for_message_request.py create mode 100644 test/test_user_select_component_response.py create mode 100644 test/test_user_select_default_value.py create mode 100644 test/test_user_select_default_value_response.py create mode 100644 test/test_vanity_url_error_response.py create mode 100644 test/test_vanity_url_response.py create mode 100644 test/test_voice_region_response.py create mode 100644 test/test_voice_scheduled_event_create_request.py create mode 100644 test/test_voice_scheduled_event_patch_request_partial.py create mode 100644 test/test_voice_scheduled_event_response.py create mode 100644 test/test_voice_state_response.py create mode 100644 test/test_webhook_slack_embed.py create mode 100644 test/test_webhook_slack_embed_field.py create mode 100644 test/test_webhook_source_channel_response.py create mode 100644 test/test_webhook_source_guild_response.py create mode 100644 test/test_welcome_message_response.py create mode 100644 test/test_welcome_screen_patch_request_partial.py create mode 100644 test/test_widget_activity.py create mode 100644 test/test_widget_channel.py create mode 100644 test/test_widget_member.py create mode 100644 test/test_widget_response.py create mode 100644 test/test_widget_settings_response.py create mode 100644 tox.ini diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..d2157c5 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: dc_rest Python package + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build package + run: | + pip install build + python -m build diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43995bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/README.md b/README.md index afed6dd..4e87a97 100644 --- a/README.md +++ b/README.md @@ -1 +1,922 @@ -# dc-rest-python +# Python API client for dc-rest +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +- API version: 10 +- Package version: 10 +- Build date: 2025-07-01T06:33:02.994204459Z[Etc/UTC] + +## Requirements. + +Python 3.9+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/dc-api/dc-rest-python.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/dc-api/dc-rest-python.git`) + +Then import the package: +```python +import dc_rest +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import dc_rest +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + add_group_dm_user_request = dc_rest.AddGroupDmUserRequest() # AddGroupDmUserRequest | + + try: + api_response = await api_instance.add_group_dm_user(channel_id, user_id, add_group_dm_user_request) + print("The response of DefaultApi->add_group_dm_user:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling DefaultApi->add_group_dm_user: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://discord.com/api/v10* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**add_group_dm_user**](docs/DefaultApi.md#add_group_dm_user) | **PUT** /channels/{channel_id}/recipients/{user_id} | +*DefaultApi* | [**add_guild_member**](docs/DefaultApi.md#add_guild_member) | **PUT** /guilds/{guild_id}/members/{user_id} | +*DefaultApi* | [**add_guild_member_role**](docs/DefaultApi.md#add_guild_member_role) | **PUT** /guilds/{guild_id}/members/{user_id}/roles/{role_id} | +*DefaultApi* | [**add_lobby_member**](docs/DefaultApi.md#add_lobby_member) | **PUT** /lobbies/{lobby_id}/members/{user_id} | +*DefaultApi* | [**add_my_message_reaction**](docs/DefaultApi.md#add_my_message_reaction) | **PUT** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me | +*DefaultApi* | [**add_thread_member**](docs/DefaultApi.md#add_thread_member) | **PUT** /channels/{channel_id}/thread-members/{user_id} | +*DefaultApi* | [**applications_get_activity_instance**](docs/DefaultApi.md#applications_get_activity_instance) | **GET** /applications/{application_id}/activity-instances/{instance_id} | +*DefaultApi* | [**ban_user_from_guild**](docs/DefaultApi.md#ban_user_from_guild) | **PUT** /guilds/{guild_id}/bans/{user_id} | +*DefaultApi* | [**bulk_ban_users_from_guild**](docs/DefaultApi.md#bulk_ban_users_from_guild) | **POST** /guilds/{guild_id}/bulk-ban | +*DefaultApi* | [**bulk_delete_messages**](docs/DefaultApi.md#bulk_delete_messages) | **POST** /channels/{channel_id}/messages/bulk-delete | +*DefaultApi* | [**bulk_set_application_commands**](docs/DefaultApi.md#bulk_set_application_commands) | **PUT** /applications/{application_id}/commands | +*DefaultApi* | [**bulk_set_guild_application_commands**](docs/DefaultApi.md#bulk_set_guild_application_commands) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands | +*DefaultApi* | [**bulk_update_guild_channels**](docs/DefaultApi.md#bulk_update_guild_channels) | **PATCH** /guilds/{guild_id}/channels | +*DefaultApi* | [**bulk_update_guild_roles**](docs/DefaultApi.md#bulk_update_guild_roles) | **PATCH** /guilds/{guild_id}/roles | +*DefaultApi* | [**bulk_update_lobby_members**](docs/DefaultApi.md#bulk_update_lobby_members) | **POST** /lobbies/{lobby_id}/members/bulk | +*DefaultApi* | [**consume_entitlement**](docs/DefaultApi.md#consume_entitlement) | **POST** /applications/{application_id}/entitlements/{entitlement_id}/consume | +*DefaultApi* | [**create_application_command**](docs/DefaultApi.md#create_application_command) | **POST** /applications/{application_id}/commands | +*DefaultApi* | [**create_application_emoji**](docs/DefaultApi.md#create_application_emoji) | **POST** /applications/{application_id}/emojis | +*DefaultApi* | [**create_auto_moderation_rule**](docs/DefaultApi.md#create_auto_moderation_rule) | **POST** /guilds/{guild_id}/auto-moderation/rules | +*DefaultApi* | [**create_channel_invite**](docs/DefaultApi.md#create_channel_invite) | **POST** /channels/{channel_id}/invites | +*DefaultApi* | [**create_dm**](docs/DefaultApi.md#create_dm) | **POST** /users/@me/channels | +*DefaultApi* | [**create_entitlement**](docs/DefaultApi.md#create_entitlement) | **POST** /applications/{application_id}/entitlements | +*DefaultApi* | [**create_guild**](docs/DefaultApi.md#create_guild) | **POST** /guilds | +*DefaultApi* | [**create_guild_application_command**](docs/DefaultApi.md#create_guild_application_command) | **POST** /applications/{application_id}/guilds/{guild_id}/commands | +*DefaultApi* | [**create_guild_channel**](docs/DefaultApi.md#create_guild_channel) | **POST** /guilds/{guild_id}/channels | +*DefaultApi* | [**create_guild_emoji**](docs/DefaultApi.md#create_guild_emoji) | **POST** /guilds/{guild_id}/emojis | +*DefaultApi* | [**create_guild_from_template**](docs/DefaultApi.md#create_guild_from_template) | **POST** /guilds/templates/{code} | +*DefaultApi* | [**create_guild_role**](docs/DefaultApi.md#create_guild_role) | **POST** /guilds/{guild_id}/roles | +*DefaultApi* | [**create_guild_scheduled_event**](docs/DefaultApi.md#create_guild_scheduled_event) | **POST** /guilds/{guild_id}/scheduled-events | +*DefaultApi* | [**create_guild_soundboard_sound**](docs/DefaultApi.md#create_guild_soundboard_sound) | **POST** /guilds/{guild_id}/soundboard-sounds | +*DefaultApi* | [**create_guild_sticker**](docs/DefaultApi.md#create_guild_sticker) | **POST** /guilds/{guild_id}/stickers | +*DefaultApi* | [**create_guild_template**](docs/DefaultApi.md#create_guild_template) | **POST** /guilds/{guild_id}/templates | +*DefaultApi* | [**create_interaction_response**](docs/DefaultApi.md#create_interaction_response) | **POST** /interactions/{interaction_id}/{interaction_token}/callback | +*DefaultApi* | [**create_lobby**](docs/DefaultApi.md#create_lobby) | **POST** /lobbies | +*DefaultApi* | [**create_lobby_message**](docs/DefaultApi.md#create_lobby_message) | **POST** /lobbies/{lobby_id}/messages | +*DefaultApi* | [**create_message**](docs/DefaultApi.md#create_message) | **POST** /channels/{channel_id}/messages | +*DefaultApi* | [**create_or_join_lobby**](docs/DefaultApi.md#create_or_join_lobby) | **PUT** /lobbies | +*DefaultApi* | [**create_pin**](docs/DefaultApi.md#create_pin) | **PUT** /channels/{channel_id}/messages/pins/{message_id} | +*DefaultApi* | [**create_stage_instance**](docs/DefaultApi.md#create_stage_instance) | **POST** /stage-instances | +*DefaultApi* | [**create_thread**](docs/DefaultApi.md#create_thread) | **POST** /channels/{channel_id}/threads | +*DefaultApi* | [**create_thread_from_message**](docs/DefaultApi.md#create_thread_from_message) | **POST** /channels/{channel_id}/messages/{message_id}/threads | +*DefaultApi* | [**create_webhook**](docs/DefaultApi.md#create_webhook) | **POST** /channels/{channel_id}/webhooks | +*DefaultApi* | [**crosspost_message**](docs/DefaultApi.md#crosspost_message) | **POST** /channels/{channel_id}/messages/{message_id}/crosspost | +*DefaultApi* | [**delete_all_message_reactions**](docs/DefaultApi.md#delete_all_message_reactions) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions | +*DefaultApi* | [**delete_all_message_reactions_by_emoji**](docs/DefaultApi.md#delete_all_message_reactions_by_emoji) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} | +*DefaultApi* | [**delete_application_command**](docs/DefaultApi.md#delete_application_command) | **DELETE** /applications/{application_id}/commands/{command_id} | +*DefaultApi* | [**delete_application_emoji**](docs/DefaultApi.md#delete_application_emoji) | **DELETE** /applications/{application_id}/emojis/{emoji_id} | +*DefaultApi* | [**delete_application_user_role_connection**](docs/DefaultApi.md#delete_application_user_role_connection) | **DELETE** /users/@me/applications/{application_id}/role-connection | +*DefaultApi* | [**delete_auto_moderation_rule**](docs/DefaultApi.md#delete_auto_moderation_rule) | **DELETE** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +*DefaultApi* | [**delete_channel**](docs/DefaultApi.md#delete_channel) | **DELETE** /channels/{channel_id} | +*DefaultApi* | [**delete_channel_permission_overwrite**](docs/DefaultApi.md#delete_channel_permission_overwrite) | **DELETE** /channels/{channel_id}/permissions/{overwrite_id} | +*DefaultApi* | [**delete_entitlement**](docs/DefaultApi.md#delete_entitlement) | **DELETE** /applications/{application_id}/entitlements/{entitlement_id} | +*DefaultApi* | [**delete_group_dm_user**](docs/DefaultApi.md#delete_group_dm_user) | **DELETE** /channels/{channel_id}/recipients/{user_id} | +*DefaultApi* | [**delete_guild**](docs/DefaultApi.md#delete_guild) | **DELETE** /guilds/{guild_id} | +*DefaultApi* | [**delete_guild_application_command**](docs/DefaultApi.md#delete_guild_application_command) | **DELETE** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +*DefaultApi* | [**delete_guild_emoji**](docs/DefaultApi.md#delete_guild_emoji) | **DELETE** /guilds/{guild_id}/emojis/{emoji_id} | +*DefaultApi* | [**delete_guild_integration**](docs/DefaultApi.md#delete_guild_integration) | **DELETE** /guilds/{guild_id}/integrations/{integration_id} | +*DefaultApi* | [**delete_guild_member**](docs/DefaultApi.md#delete_guild_member) | **DELETE** /guilds/{guild_id}/members/{user_id} | +*DefaultApi* | [**delete_guild_member_role**](docs/DefaultApi.md#delete_guild_member_role) | **DELETE** /guilds/{guild_id}/members/{user_id}/roles/{role_id} | +*DefaultApi* | [**delete_guild_role**](docs/DefaultApi.md#delete_guild_role) | **DELETE** /guilds/{guild_id}/roles/{role_id} | +*DefaultApi* | [**delete_guild_scheduled_event**](docs/DefaultApi.md#delete_guild_scheduled_event) | **DELETE** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +*DefaultApi* | [**delete_guild_soundboard_sound**](docs/DefaultApi.md#delete_guild_soundboard_sound) | **DELETE** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +*DefaultApi* | [**delete_guild_sticker**](docs/DefaultApi.md#delete_guild_sticker) | **DELETE** /guilds/{guild_id}/stickers/{sticker_id} | +*DefaultApi* | [**delete_guild_template**](docs/DefaultApi.md#delete_guild_template) | **DELETE** /guilds/{guild_id}/templates/{code} | +*DefaultApi* | [**delete_lobby_member**](docs/DefaultApi.md#delete_lobby_member) | **DELETE** /lobbies/{lobby_id}/members/{user_id} | +*DefaultApi* | [**delete_message**](docs/DefaultApi.md#delete_message) | **DELETE** /channels/{channel_id}/messages/{message_id} | +*DefaultApi* | [**delete_my_message_reaction**](docs/DefaultApi.md#delete_my_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me | +*DefaultApi* | [**delete_original_webhook_message**](docs/DefaultApi.md#delete_original_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +*DefaultApi* | [**delete_pin**](docs/DefaultApi.md#delete_pin) | **DELETE** /channels/{channel_id}/messages/pins/{message_id} | +*DefaultApi* | [**delete_stage_instance**](docs/DefaultApi.md#delete_stage_instance) | **DELETE** /stage-instances/{channel_id} | +*DefaultApi* | [**delete_thread_member**](docs/DefaultApi.md#delete_thread_member) | **DELETE** /channels/{channel_id}/thread-members/{user_id} | +*DefaultApi* | [**delete_user_message_reaction**](docs/DefaultApi.md#delete_user_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id} | +*DefaultApi* | [**delete_webhook**](docs/DefaultApi.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | +*DefaultApi* | [**delete_webhook_by_token**](docs/DefaultApi.md#delete_webhook_by_token) | **DELETE** /webhooks/{webhook_id}/{webhook_token} | +*DefaultApi* | [**delete_webhook_message**](docs/DefaultApi.md#delete_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +*DefaultApi* | [**deprecated_create_pin**](docs/DefaultApi.md#deprecated_create_pin) | **PUT** /channels/{channel_id}/pins/{message_id} | +*DefaultApi* | [**deprecated_delete_pin**](docs/DefaultApi.md#deprecated_delete_pin) | **DELETE** /channels/{channel_id}/pins/{message_id} | +*DefaultApi* | [**deprecated_list_pins**](docs/DefaultApi.md#deprecated_list_pins) | **GET** /channels/{channel_id}/pins | +*DefaultApi* | [**edit_lobby**](docs/DefaultApi.md#edit_lobby) | **PATCH** /lobbies/{lobby_id} | +*DefaultApi* | [**edit_lobby_channel_link**](docs/DefaultApi.md#edit_lobby_channel_link) | **PATCH** /lobbies/{lobby_id}/channel-linking | +*DefaultApi* | [**execute_github_compatible_webhook**](docs/DefaultApi.md#execute_github_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/github | +*DefaultApi* | [**execute_slack_compatible_webhook**](docs/DefaultApi.md#execute_slack_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/slack | +*DefaultApi* | [**execute_webhook**](docs/DefaultApi.md#execute_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token} | +*DefaultApi* | [**follow_channel**](docs/DefaultApi.md#follow_channel) | **POST** /channels/{channel_id}/followers | +*DefaultApi* | [**get_active_guild_threads**](docs/DefaultApi.md#get_active_guild_threads) | **GET** /guilds/{guild_id}/threads/active | +*DefaultApi* | [**get_answer_voters**](docs/DefaultApi.md#get_answer_voters) | **GET** /channels/{channel_id}/polls/{message_id}/answers/{answer_id} | +*DefaultApi* | [**get_application**](docs/DefaultApi.md#get_application) | **GET** /applications/{application_id} | +*DefaultApi* | [**get_application_command**](docs/DefaultApi.md#get_application_command) | **GET** /applications/{application_id}/commands/{command_id} | +*DefaultApi* | [**get_application_emoji**](docs/DefaultApi.md#get_application_emoji) | **GET** /applications/{application_id}/emojis/{emoji_id} | +*DefaultApi* | [**get_application_role_connections_metadata**](docs/DefaultApi.md#get_application_role_connections_metadata) | **GET** /applications/{application_id}/role-connections/metadata | +*DefaultApi* | [**get_application_user_role_connection**](docs/DefaultApi.md#get_application_user_role_connection) | **GET** /users/@me/applications/{application_id}/role-connection | +*DefaultApi* | [**get_auto_moderation_rule**](docs/DefaultApi.md#get_auto_moderation_rule) | **GET** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +*DefaultApi* | [**get_bot_gateway**](docs/DefaultApi.md#get_bot_gateway) | **GET** /gateway/bot | +*DefaultApi* | [**get_channel**](docs/DefaultApi.md#get_channel) | **GET** /channels/{channel_id} | +*DefaultApi* | [**get_entitlement**](docs/DefaultApi.md#get_entitlement) | **GET** /applications/{application_id}/entitlements/{entitlement_id} | +*DefaultApi* | [**get_entitlements**](docs/DefaultApi.md#get_entitlements) | **GET** /applications/{application_id}/entitlements | +*DefaultApi* | [**get_gateway**](docs/DefaultApi.md#get_gateway) | **GET** /gateway | +*DefaultApi* | [**get_guild**](docs/DefaultApi.md#get_guild) | **GET** /guilds/{guild_id} | +*DefaultApi* | [**get_guild_application_command**](docs/DefaultApi.md#get_guild_application_command) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +*DefaultApi* | [**get_guild_application_command_permissions**](docs/DefaultApi.md#get_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions | +*DefaultApi* | [**get_guild_ban**](docs/DefaultApi.md#get_guild_ban) | **GET** /guilds/{guild_id}/bans/{user_id} | +*DefaultApi* | [**get_guild_emoji**](docs/DefaultApi.md#get_guild_emoji) | **GET** /guilds/{guild_id}/emojis/{emoji_id} | +*DefaultApi* | [**get_guild_member**](docs/DefaultApi.md#get_guild_member) | **GET** /guilds/{guild_id}/members/{user_id} | +*DefaultApi* | [**get_guild_new_member_welcome**](docs/DefaultApi.md#get_guild_new_member_welcome) | **GET** /guilds/{guild_id}/new-member-welcome | +*DefaultApi* | [**get_guild_preview**](docs/DefaultApi.md#get_guild_preview) | **GET** /guilds/{guild_id}/preview | +*DefaultApi* | [**get_guild_role**](docs/DefaultApi.md#get_guild_role) | **GET** /guilds/{guild_id}/roles/{role_id} | +*DefaultApi* | [**get_guild_scheduled_event**](docs/DefaultApi.md#get_guild_scheduled_event) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +*DefaultApi* | [**get_guild_soundboard_sound**](docs/DefaultApi.md#get_guild_soundboard_sound) | **GET** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +*DefaultApi* | [**get_guild_sticker**](docs/DefaultApi.md#get_guild_sticker) | **GET** /guilds/{guild_id}/stickers/{sticker_id} | +*DefaultApi* | [**get_guild_template**](docs/DefaultApi.md#get_guild_template) | **GET** /guilds/templates/{code} | +*DefaultApi* | [**get_guild_vanity_url**](docs/DefaultApi.md#get_guild_vanity_url) | **GET** /guilds/{guild_id}/vanity-url | +*DefaultApi* | [**get_guild_webhooks**](docs/DefaultApi.md#get_guild_webhooks) | **GET** /guilds/{guild_id}/webhooks | +*DefaultApi* | [**get_guild_welcome_screen**](docs/DefaultApi.md#get_guild_welcome_screen) | **GET** /guilds/{guild_id}/welcome-screen | +*DefaultApi* | [**get_guild_widget**](docs/DefaultApi.md#get_guild_widget) | **GET** /guilds/{guild_id}/widget.json | +*DefaultApi* | [**get_guild_widget_png**](docs/DefaultApi.md#get_guild_widget_png) | **GET** /guilds/{guild_id}/widget.png | +*DefaultApi* | [**get_guild_widget_settings**](docs/DefaultApi.md#get_guild_widget_settings) | **GET** /guilds/{guild_id}/widget | +*DefaultApi* | [**get_guilds_onboarding**](docs/DefaultApi.md#get_guilds_onboarding) | **GET** /guilds/{guild_id}/onboarding | +*DefaultApi* | [**get_lobby**](docs/DefaultApi.md#get_lobby) | **GET** /lobbies/{lobby_id} | +*DefaultApi* | [**get_lobby_messages**](docs/DefaultApi.md#get_lobby_messages) | **GET** /lobbies/{lobby_id}/messages | +*DefaultApi* | [**get_message**](docs/DefaultApi.md#get_message) | **GET** /channels/{channel_id}/messages/{message_id} | +*DefaultApi* | [**get_my_application**](docs/DefaultApi.md#get_my_application) | **GET** /applications/@me | +*DefaultApi* | [**get_my_guild_member**](docs/DefaultApi.md#get_my_guild_member) | **GET** /users/@me/guilds/{guild_id}/member | +*DefaultApi* | [**get_my_oauth2_application**](docs/DefaultApi.md#get_my_oauth2_application) | **GET** /oauth2/applications/@me | +*DefaultApi* | [**get_my_oauth2_authorization**](docs/DefaultApi.md#get_my_oauth2_authorization) | **GET** /oauth2/@me | +*DefaultApi* | [**get_my_user**](docs/DefaultApi.md#get_my_user) | **GET** /users/@me | +*DefaultApi* | [**get_openid_connect_userinfo**](docs/DefaultApi.md#get_openid_connect_userinfo) | **GET** /oauth2/userinfo | +*DefaultApi* | [**get_original_webhook_message**](docs/DefaultApi.md#get_original_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +*DefaultApi* | [**get_public_keys**](docs/DefaultApi.md#get_public_keys) | **GET** /oauth2/keys | +*DefaultApi* | [**get_self_voice_state**](docs/DefaultApi.md#get_self_voice_state) | **GET** /guilds/{guild_id}/voice-states/@me | +*DefaultApi* | [**get_soundboard_default_sounds**](docs/DefaultApi.md#get_soundboard_default_sounds) | **GET** /soundboard-default-sounds | +*DefaultApi* | [**get_stage_instance**](docs/DefaultApi.md#get_stage_instance) | **GET** /stage-instances/{channel_id} | +*DefaultApi* | [**get_sticker**](docs/DefaultApi.md#get_sticker) | **GET** /stickers/{sticker_id} | +*DefaultApi* | [**get_sticker_pack**](docs/DefaultApi.md#get_sticker_pack) | **GET** /sticker-packs/{pack_id} | +*DefaultApi* | [**get_thread_member**](docs/DefaultApi.md#get_thread_member) | **GET** /channels/{channel_id}/thread-members/{user_id} | +*DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /users/{user_id} | +*DefaultApi* | [**get_voice_state**](docs/DefaultApi.md#get_voice_state) | **GET** /guilds/{guild_id}/voice-states/{user_id} | +*DefaultApi* | [**get_webhook**](docs/DefaultApi.md#get_webhook) | **GET** /webhooks/{webhook_id} | +*DefaultApi* | [**get_webhook_by_token**](docs/DefaultApi.md#get_webhook_by_token) | **GET** /webhooks/{webhook_id}/{webhook_token} | +*DefaultApi* | [**get_webhook_message**](docs/DefaultApi.md#get_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +*DefaultApi* | [**invite_resolve**](docs/DefaultApi.md#invite_resolve) | **GET** /invites/{code} | +*DefaultApi* | [**invite_revoke**](docs/DefaultApi.md#invite_revoke) | **DELETE** /invites/{code} | +*DefaultApi* | [**join_thread**](docs/DefaultApi.md#join_thread) | **PUT** /channels/{channel_id}/thread-members/@me | +*DefaultApi* | [**leave_guild**](docs/DefaultApi.md#leave_guild) | **DELETE** /users/@me/guilds/{guild_id} | +*DefaultApi* | [**leave_lobby**](docs/DefaultApi.md#leave_lobby) | **DELETE** /lobbies/{lobby_id}/members/@me | +*DefaultApi* | [**leave_thread**](docs/DefaultApi.md#leave_thread) | **DELETE** /channels/{channel_id}/thread-members/@me | +*DefaultApi* | [**list_application_commands**](docs/DefaultApi.md#list_application_commands) | **GET** /applications/{application_id}/commands | +*DefaultApi* | [**list_application_emojis**](docs/DefaultApi.md#list_application_emojis) | **GET** /applications/{application_id}/emojis | +*DefaultApi* | [**list_auto_moderation_rules**](docs/DefaultApi.md#list_auto_moderation_rules) | **GET** /guilds/{guild_id}/auto-moderation/rules | +*DefaultApi* | [**list_channel_invites**](docs/DefaultApi.md#list_channel_invites) | **GET** /channels/{channel_id}/invites | +*DefaultApi* | [**list_channel_webhooks**](docs/DefaultApi.md#list_channel_webhooks) | **GET** /channels/{channel_id}/webhooks | +*DefaultApi* | [**list_guild_application_command_permissions**](docs/DefaultApi.md#list_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/permissions | +*DefaultApi* | [**list_guild_application_commands**](docs/DefaultApi.md#list_guild_application_commands) | **GET** /applications/{application_id}/guilds/{guild_id}/commands | +*DefaultApi* | [**list_guild_audit_log_entries**](docs/DefaultApi.md#list_guild_audit_log_entries) | **GET** /guilds/{guild_id}/audit-logs | +*DefaultApi* | [**list_guild_bans**](docs/DefaultApi.md#list_guild_bans) | **GET** /guilds/{guild_id}/bans | +*DefaultApi* | [**list_guild_channels**](docs/DefaultApi.md#list_guild_channels) | **GET** /guilds/{guild_id}/channels | +*DefaultApi* | [**list_guild_emojis**](docs/DefaultApi.md#list_guild_emojis) | **GET** /guilds/{guild_id}/emojis | +*DefaultApi* | [**list_guild_integrations**](docs/DefaultApi.md#list_guild_integrations) | **GET** /guilds/{guild_id}/integrations | +*DefaultApi* | [**list_guild_invites**](docs/DefaultApi.md#list_guild_invites) | **GET** /guilds/{guild_id}/invites | +*DefaultApi* | [**list_guild_members**](docs/DefaultApi.md#list_guild_members) | **GET** /guilds/{guild_id}/members | +*DefaultApi* | [**list_guild_roles**](docs/DefaultApi.md#list_guild_roles) | **GET** /guilds/{guild_id}/roles | +*DefaultApi* | [**list_guild_scheduled_event_users**](docs/DefaultApi.md#list_guild_scheduled_event_users) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users | +*DefaultApi* | [**list_guild_scheduled_events**](docs/DefaultApi.md#list_guild_scheduled_events) | **GET** /guilds/{guild_id}/scheduled-events | +*DefaultApi* | [**list_guild_soundboard_sounds**](docs/DefaultApi.md#list_guild_soundboard_sounds) | **GET** /guilds/{guild_id}/soundboard-sounds | +*DefaultApi* | [**list_guild_stickers**](docs/DefaultApi.md#list_guild_stickers) | **GET** /guilds/{guild_id}/stickers | +*DefaultApi* | [**list_guild_templates**](docs/DefaultApi.md#list_guild_templates) | **GET** /guilds/{guild_id}/templates | +*DefaultApi* | [**list_guild_voice_regions**](docs/DefaultApi.md#list_guild_voice_regions) | **GET** /guilds/{guild_id}/regions | +*DefaultApi* | [**list_message_reactions_by_emoji**](docs/DefaultApi.md#list_message_reactions_by_emoji) | **GET** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} | +*DefaultApi* | [**list_messages**](docs/DefaultApi.md#list_messages) | **GET** /channels/{channel_id}/messages | +*DefaultApi* | [**list_my_connections**](docs/DefaultApi.md#list_my_connections) | **GET** /users/@me/connections | +*DefaultApi* | [**list_my_guilds**](docs/DefaultApi.md#list_my_guilds) | **GET** /users/@me/guilds | +*DefaultApi* | [**list_my_private_archived_threads**](docs/DefaultApi.md#list_my_private_archived_threads) | **GET** /channels/{channel_id}/users/@me/threads/archived/private | +*DefaultApi* | [**list_pins**](docs/DefaultApi.md#list_pins) | **GET** /channels/{channel_id}/messages/pins | +*DefaultApi* | [**list_private_archived_threads**](docs/DefaultApi.md#list_private_archived_threads) | **GET** /channels/{channel_id}/threads/archived/private | +*DefaultApi* | [**list_public_archived_threads**](docs/DefaultApi.md#list_public_archived_threads) | **GET** /channels/{channel_id}/threads/archived/public | +*DefaultApi* | [**list_sticker_packs**](docs/DefaultApi.md#list_sticker_packs) | **GET** /sticker-packs | +*DefaultApi* | [**list_thread_members**](docs/DefaultApi.md#list_thread_members) | **GET** /channels/{channel_id}/thread-members | +*DefaultApi* | [**list_voice_regions**](docs/DefaultApi.md#list_voice_regions) | **GET** /voice/regions | +*DefaultApi* | [**partner_sdk_token**](docs/DefaultApi.md#partner_sdk_token) | **POST** /partner-sdk/token | +*DefaultApi* | [**partner_sdk_unmerge_provisional_account**](docs/DefaultApi.md#partner_sdk_unmerge_provisional_account) | **POST** /partner-sdk/provisional-accounts/unmerge | +*DefaultApi* | [**poll_expire**](docs/DefaultApi.md#poll_expire) | **POST** /channels/{channel_id}/polls/{message_id}/expire | +*DefaultApi* | [**preview_prune_guild**](docs/DefaultApi.md#preview_prune_guild) | **GET** /guilds/{guild_id}/prune | +*DefaultApi* | [**prune_guild**](docs/DefaultApi.md#prune_guild) | **POST** /guilds/{guild_id}/prune | +*DefaultApi* | [**put_guilds_onboarding**](docs/DefaultApi.md#put_guilds_onboarding) | **PUT** /guilds/{guild_id}/onboarding | +*DefaultApi* | [**search_guild_members**](docs/DefaultApi.md#search_guild_members) | **GET** /guilds/{guild_id}/members/search | +*DefaultApi* | [**send_soundboard_sound**](docs/DefaultApi.md#send_soundboard_sound) | **POST** /channels/{channel_id}/send-soundboard-sound | +*DefaultApi* | [**set_channel_permission_overwrite**](docs/DefaultApi.md#set_channel_permission_overwrite) | **PUT** /channels/{channel_id}/permissions/{overwrite_id} | +*DefaultApi* | [**set_guild_application_command_permissions**](docs/DefaultApi.md#set_guild_application_command_permissions) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions | +*DefaultApi* | [**set_guild_mfa_level**](docs/DefaultApi.md#set_guild_mfa_level) | **POST** /guilds/{guild_id}/mfa | +*DefaultApi* | [**sync_guild_template**](docs/DefaultApi.md#sync_guild_template) | **PUT** /guilds/{guild_id}/templates/{code} | +*DefaultApi* | [**thread_search**](docs/DefaultApi.md#thread_search) | **GET** /channels/{channel_id}/threads/search | +*DefaultApi* | [**trigger_typing_indicator**](docs/DefaultApi.md#trigger_typing_indicator) | **POST** /channels/{channel_id}/typing | +*DefaultApi* | [**unban_user_from_guild**](docs/DefaultApi.md#unban_user_from_guild) | **DELETE** /guilds/{guild_id}/bans/{user_id} | +*DefaultApi* | [**update_application**](docs/DefaultApi.md#update_application) | **PATCH** /applications/{application_id} | +*DefaultApi* | [**update_application_command**](docs/DefaultApi.md#update_application_command) | **PATCH** /applications/{application_id}/commands/{command_id} | +*DefaultApi* | [**update_application_emoji**](docs/DefaultApi.md#update_application_emoji) | **PATCH** /applications/{application_id}/emojis/{emoji_id} | +*DefaultApi* | [**update_application_role_connections_metadata**](docs/DefaultApi.md#update_application_role_connections_metadata) | **PUT** /applications/{application_id}/role-connections/metadata | +*DefaultApi* | [**update_application_user_role_connection**](docs/DefaultApi.md#update_application_user_role_connection) | **PUT** /users/@me/applications/{application_id}/role-connection | +*DefaultApi* | [**update_auto_moderation_rule**](docs/DefaultApi.md#update_auto_moderation_rule) | **PATCH** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +*DefaultApi* | [**update_channel**](docs/DefaultApi.md#update_channel) | **PATCH** /channels/{channel_id} | +*DefaultApi* | [**update_guild**](docs/DefaultApi.md#update_guild) | **PATCH** /guilds/{guild_id} | +*DefaultApi* | [**update_guild_application_command**](docs/DefaultApi.md#update_guild_application_command) | **PATCH** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +*DefaultApi* | [**update_guild_emoji**](docs/DefaultApi.md#update_guild_emoji) | **PATCH** /guilds/{guild_id}/emojis/{emoji_id} | +*DefaultApi* | [**update_guild_member**](docs/DefaultApi.md#update_guild_member) | **PATCH** /guilds/{guild_id}/members/{user_id} | +*DefaultApi* | [**update_guild_role**](docs/DefaultApi.md#update_guild_role) | **PATCH** /guilds/{guild_id}/roles/{role_id} | +*DefaultApi* | [**update_guild_scheduled_event**](docs/DefaultApi.md#update_guild_scheduled_event) | **PATCH** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +*DefaultApi* | [**update_guild_soundboard_sound**](docs/DefaultApi.md#update_guild_soundboard_sound) | **PATCH** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +*DefaultApi* | [**update_guild_sticker**](docs/DefaultApi.md#update_guild_sticker) | **PATCH** /guilds/{guild_id}/stickers/{sticker_id} | +*DefaultApi* | [**update_guild_template**](docs/DefaultApi.md#update_guild_template) | **PATCH** /guilds/{guild_id}/templates/{code} | +*DefaultApi* | [**update_guild_welcome_screen**](docs/DefaultApi.md#update_guild_welcome_screen) | **PATCH** /guilds/{guild_id}/welcome-screen | +*DefaultApi* | [**update_guild_widget_settings**](docs/DefaultApi.md#update_guild_widget_settings) | **PATCH** /guilds/{guild_id}/widget | +*DefaultApi* | [**update_message**](docs/DefaultApi.md#update_message) | **PATCH** /channels/{channel_id}/messages/{message_id} | +*DefaultApi* | [**update_my_application**](docs/DefaultApi.md#update_my_application) | **PATCH** /applications/@me | +*DefaultApi* | [**update_my_guild_member**](docs/DefaultApi.md#update_my_guild_member) | **PATCH** /guilds/{guild_id}/members/@me | +*DefaultApi* | [**update_my_user**](docs/DefaultApi.md#update_my_user) | **PATCH** /users/@me | +*DefaultApi* | [**update_original_webhook_message**](docs/DefaultApi.md#update_original_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +*DefaultApi* | [**update_self_voice_state**](docs/DefaultApi.md#update_self_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/@me | +*DefaultApi* | [**update_stage_instance**](docs/DefaultApi.md#update_stage_instance) | **PATCH** /stage-instances/{channel_id} | +*DefaultApi* | [**update_voice_state**](docs/DefaultApi.md#update_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/{user_id} | +*DefaultApi* | [**update_webhook**](docs/DefaultApi.md#update_webhook) | **PATCH** /webhooks/{webhook_id} | +*DefaultApi* | [**update_webhook_by_token**](docs/DefaultApi.md#update_webhook_by_token) | **PATCH** /webhooks/{webhook_id}/{webhook_token} | +*DefaultApi* | [**update_webhook_message**](docs/DefaultApi.md#update_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +*DefaultApi* | [**upload_application_attachment**](docs/DefaultApi.md#upload_application_attachment) | **POST** /applications/{application_id}/attachment | + + +## Documentation For Models + + - [AccountResponse](docs/AccountResponse.md) + - [ActionRowComponentForMessageRequest](docs/ActionRowComponentForMessageRequest.md) + - [ActionRowComponentForMessageRequestComponentsInner](docs/ActionRowComponentForMessageRequestComponentsInner.md) + - [ActionRowComponentForModalRequest](docs/ActionRowComponentForModalRequest.md) + - [ActionRowComponentResponse](docs/ActionRowComponentResponse.md) + - [ActionRowComponentResponseComponentsInner](docs/ActionRowComponentResponseComponentsInner.md) + - [ActivitiesAttachmentResponse](docs/ActivitiesAttachmentResponse.md) + - [AddGroupDmUser201Response](docs/AddGroupDmUser201Response.md) + - [AddGroupDmUserRequest](docs/AddGroupDmUserRequest.md) + - [AddGuildMemberRequest](docs/AddGuildMemberRequest.md) + - [AddLobbyMemberRequest](docs/AddLobbyMemberRequest.md) + - [ApplicationCommandAttachmentOption](docs/ApplicationCommandAttachmentOption.md) + - [ApplicationCommandAttachmentOptionResponse](docs/ApplicationCommandAttachmentOptionResponse.md) + - [ApplicationCommandAutocompleteCallbackRequest](docs/ApplicationCommandAutocompleteCallbackRequest.md) + - [ApplicationCommandAutocompleteCallbackRequestData](docs/ApplicationCommandAutocompleteCallbackRequestData.md) + - [ApplicationCommandBooleanOption](docs/ApplicationCommandBooleanOption.md) + - [ApplicationCommandBooleanOptionResponse](docs/ApplicationCommandBooleanOptionResponse.md) + - [ApplicationCommandChannelOption](docs/ApplicationCommandChannelOption.md) + - [ApplicationCommandChannelOptionResponse](docs/ApplicationCommandChannelOptionResponse.md) + - [ApplicationCommandCreateRequest](docs/ApplicationCommandCreateRequest.md) + - [ApplicationCommandCreateRequestOptionsInner](docs/ApplicationCommandCreateRequestOptionsInner.md) + - [ApplicationCommandIntegerOption](docs/ApplicationCommandIntegerOption.md) + - [ApplicationCommandIntegerOptionResponse](docs/ApplicationCommandIntegerOptionResponse.md) + - [ApplicationCommandInteractionMetadataResponse](docs/ApplicationCommandInteractionMetadataResponse.md) + - [ApplicationCommandMentionableOption](docs/ApplicationCommandMentionableOption.md) + - [ApplicationCommandMentionableOptionResponse](docs/ApplicationCommandMentionableOptionResponse.md) + - [ApplicationCommandNumberOption](docs/ApplicationCommandNumberOption.md) + - [ApplicationCommandNumberOptionResponse](docs/ApplicationCommandNumberOptionResponse.md) + - [ApplicationCommandOptionIntegerChoice](docs/ApplicationCommandOptionIntegerChoice.md) + - [ApplicationCommandOptionIntegerChoiceResponse](docs/ApplicationCommandOptionIntegerChoiceResponse.md) + - [ApplicationCommandOptionNumberChoice](docs/ApplicationCommandOptionNumberChoice.md) + - [ApplicationCommandOptionNumberChoiceResponse](docs/ApplicationCommandOptionNumberChoiceResponse.md) + - [ApplicationCommandOptionStringChoice](docs/ApplicationCommandOptionStringChoice.md) + - [ApplicationCommandOptionStringChoiceResponse](docs/ApplicationCommandOptionStringChoiceResponse.md) + - [ApplicationCommandPatchRequestPartial](docs/ApplicationCommandPatchRequestPartial.md) + - [ApplicationCommandPermission](docs/ApplicationCommandPermission.md) + - [ApplicationCommandResponse](docs/ApplicationCommandResponse.md) + - [ApplicationCommandResponseOptionsInner](docs/ApplicationCommandResponseOptionsInner.md) + - [ApplicationCommandRoleOption](docs/ApplicationCommandRoleOption.md) + - [ApplicationCommandRoleOptionResponse](docs/ApplicationCommandRoleOptionResponse.md) + - [ApplicationCommandStringOption](docs/ApplicationCommandStringOption.md) + - [ApplicationCommandStringOptionResponse](docs/ApplicationCommandStringOptionResponse.md) + - [ApplicationCommandSubcommandGroupOption](docs/ApplicationCommandSubcommandGroupOption.md) + - [ApplicationCommandSubcommandGroupOptionResponse](docs/ApplicationCommandSubcommandGroupOptionResponse.md) + - [ApplicationCommandSubcommandOption](docs/ApplicationCommandSubcommandOption.md) + - [ApplicationCommandSubcommandOptionOptionsInner](docs/ApplicationCommandSubcommandOptionOptionsInner.md) + - [ApplicationCommandSubcommandOptionResponse](docs/ApplicationCommandSubcommandOptionResponse.md) + - [ApplicationCommandSubcommandOptionResponseOptionsInner](docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md) + - [ApplicationCommandUpdateRequest](docs/ApplicationCommandUpdateRequest.md) + - [ApplicationCommandUserOption](docs/ApplicationCommandUserOption.md) + - [ApplicationCommandUserOptionResponse](docs/ApplicationCommandUserOptionResponse.md) + - [ApplicationFormPartial](docs/ApplicationFormPartial.md) + - [ApplicationFormPartialDescription](docs/ApplicationFormPartialDescription.md) + - [ApplicationFormPartialIntegrationTypesConfigValue](docs/ApplicationFormPartialIntegrationTypesConfigValue.md) + - [ApplicationIncomingWebhookResponse](docs/ApplicationIncomingWebhookResponse.md) + - [ApplicationIntegrationTypeConfiguration](docs/ApplicationIntegrationTypeConfiguration.md) + - [ApplicationIntegrationTypeConfigurationResponse](docs/ApplicationIntegrationTypeConfigurationResponse.md) + - [ApplicationOAuth2InstallParams](docs/ApplicationOAuth2InstallParams.md) + - [ApplicationOAuth2InstallParamsResponse](docs/ApplicationOAuth2InstallParamsResponse.md) + - [ApplicationResponse](docs/ApplicationResponse.md) + - [ApplicationRoleConnectionsMetadataItemRequest](docs/ApplicationRoleConnectionsMetadataItemRequest.md) + - [ApplicationRoleConnectionsMetadataItemResponse](docs/ApplicationRoleConnectionsMetadataItemResponse.md) + - [ApplicationUserRoleConnectionResponse](docs/ApplicationUserRoleConnectionResponse.md) + - [AttachmentResponse](docs/AttachmentResponse.md) + - [AuditLogEntryResponse](docs/AuditLogEntryResponse.md) + - [AuditLogObjectChangeResponse](docs/AuditLogObjectChangeResponse.md) + - [BanUserFromGuildRequest](docs/BanUserFromGuildRequest.md) + - [BaseCreateMessageCreateRequest](docs/BaseCreateMessageCreateRequest.md) + - [BaseCreateMessageCreateRequestComponentsInner](docs/BaseCreateMessageCreateRequestComponentsInner.md) + - [BasicApplicationResponse](docs/BasicApplicationResponse.md) + - [BasicMessageResponse](docs/BasicMessageResponse.md) + - [BasicMessageResponseComponentsInner](docs/BasicMessageResponseComponentsInner.md) + - [BasicMessageResponseInteractionMetadata](docs/BasicMessageResponseInteractionMetadata.md) + - [BasicMessageResponseNonce](docs/BasicMessageResponseNonce.md) + - [BlockMessageAction](docs/BlockMessageAction.md) + - [BlockMessageActionMetadata](docs/BlockMessageActionMetadata.md) + - [BlockMessageActionMetadataResponse](docs/BlockMessageActionMetadataResponse.md) + - [BlockMessageActionResponse](docs/BlockMessageActionResponse.md) + - [BotAccountPatchRequest](docs/BotAccountPatchRequest.md) + - [BulkBanUsersFromGuildRequest](docs/BulkBanUsersFromGuildRequest.md) + - [BulkBanUsersResponse](docs/BulkBanUsersResponse.md) + - [BulkDeleteMessagesRequest](docs/BulkDeleteMessagesRequest.md) + - [BulkLobbyMemberRequest](docs/BulkLobbyMemberRequest.md) + - [BulkUpdateGuildChannelsRequestInner](docs/BulkUpdateGuildChannelsRequestInner.md) + - [BulkUpdateGuildRolesRequestInner](docs/BulkUpdateGuildRolesRequestInner.md) + - [ButtonComponentForMessageRequest](docs/ButtonComponentForMessageRequest.md) + - [ButtonComponentResponse](docs/ButtonComponentResponse.md) + - [ChannelFollowerResponse](docs/ChannelFollowerResponse.md) + - [ChannelFollowerWebhookResponse](docs/ChannelFollowerWebhookResponse.md) + - [ChannelPermissionOverwriteRequest](docs/ChannelPermissionOverwriteRequest.md) + - [ChannelPermissionOverwriteResponse](docs/ChannelPermissionOverwriteResponse.md) + - [ChannelSelectComponentForMessageRequest](docs/ChannelSelectComponentForMessageRequest.md) + - [ChannelSelectComponentResponse](docs/ChannelSelectComponentResponse.md) + - [ChannelSelectDefaultValue](docs/ChannelSelectDefaultValue.md) + - [ChannelSelectDefaultValueResponse](docs/ChannelSelectDefaultValueResponse.md) + - [CommandPermissionResponse](docs/CommandPermissionResponse.md) + - [CommandPermissionsResponse](docs/CommandPermissionsResponse.md) + - [ComponentEmojiForMessageRequest](docs/ComponentEmojiForMessageRequest.md) + - [ComponentEmojiResponse](docs/ComponentEmojiResponse.md) + - [ConnectedAccountGuildResponse](docs/ConnectedAccountGuildResponse.md) + - [ConnectedAccountIntegrationResponse](docs/ConnectedAccountIntegrationResponse.md) + - [ConnectedAccountResponse](docs/ConnectedAccountResponse.md) + - [ContainerComponentForMessageRequest](docs/ContainerComponentForMessageRequest.md) + - [ContainerComponentForMessageRequestComponentsInner](docs/ContainerComponentForMessageRequestComponentsInner.md) + - [ContainerComponentResponse](docs/ContainerComponentResponse.md) + - [ContainerComponentResponseComponentsInner](docs/ContainerComponentResponseComponentsInner.md) + - [CreateApplicationEmojiRequest](docs/CreateApplicationEmojiRequest.md) + - [CreateAutoModerationRule200Response](docs/CreateAutoModerationRule200Response.md) + - [CreateAutoModerationRuleRequest](docs/CreateAutoModerationRuleRequest.md) + - [CreateChannelInviteRequest](docs/CreateChannelInviteRequest.md) + - [CreateEntitlementRequestData](docs/CreateEntitlementRequestData.md) + - [CreateForumThreadRequest](docs/CreateForumThreadRequest.md) + - [CreateGroupDMInviteRequest](docs/CreateGroupDMInviteRequest.md) + - [CreateGuildChannelRequest](docs/CreateGuildChannelRequest.md) + - [CreateGuildEmojiRequest](docs/CreateGuildEmojiRequest.md) + - [CreateGuildFromTemplateRequest](docs/CreateGuildFromTemplateRequest.md) + - [CreateGuildInviteRequest](docs/CreateGuildInviteRequest.md) + - [CreateGuildRequestChannelItem](docs/CreateGuildRequestChannelItem.md) + - [CreateGuildRequestRoleItem](docs/CreateGuildRequestRoleItem.md) + - [CreateGuildRoleRequest](docs/CreateGuildRoleRequest.md) + - [CreateGuildScheduledEventRequest](docs/CreateGuildScheduledEventRequest.md) + - [CreateGuildTemplateRequest](docs/CreateGuildTemplateRequest.md) + - [CreateInteractionResponseRequest](docs/CreateInteractionResponseRequest.md) + - [CreateLobbyRequest](docs/CreateLobbyRequest.md) + - [CreateMessageInteractionCallbackRequest](docs/CreateMessageInteractionCallbackRequest.md) + - [CreateMessageInteractionCallbackResponse](docs/CreateMessageInteractionCallbackResponse.md) + - [CreateOrJoinLobbyRequest](docs/CreateOrJoinLobbyRequest.md) + - [CreateOrUpdateThreadTagRequest](docs/CreateOrUpdateThreadTagRequest.md) + - [CreatePrivateChannelRequest](docs/CreatePrivateChannelRequest.md) + - [CreateStageInstanceRequest](docs/CreateStageInstanceRequest.md) + - [CreateTextThreadWithMessageRequest](docs/CreateTextThreadWithMessageRequest.md) + - [CreateTextThreadWithoutMessageRequest](docs/CreateTextThreadWithoutMessageRequest.md) + - [CreateThreadRequest](docs/CreateThreadRequest.md) + - [CreateWebhookRequest](docs/CreateWebhookRequest.md) + - [CreatedThreadResponse](docs/CreatedThreadResponse.md) + - [DefaultKeywordListTriggerMetadata](docs/DefaultKeywordListTriggerMetadata.md) + - [DefaultKeywordListTriggerMetadataResponse](docs/DefaultKeywordListTriggerMetadataResponse.md) + - [DefaultKeywordListUpsertRequest](docs/DefaultKeywordListUpsertRequest.md) + - [DefaultKeywordListUpsertRequestActionsInner](docs/DefaultKeywordListUpsertRequestActionsInner.md) + - [DefaultKeywordListUpsertRequestPartial](docs/DefaultKeywordListUpsertRequestPartial.md) + - [DefaultKeywordRuleResponse](docs/DefaultKeywordRuleResponse.md) + - [DefaultKeywordRuleResponseActionsInner](docs/DefaultKeywordRuleResponseActionsInner.md) + - [DefaultReactionEmojiResponse](docs/DefaultReactionEmojiResponse.md) + - [DiscordIntegrationResponse](docs/DiscordIntegrationResponse.md) + - [EditLobbyChannelLinkRequest](docs/EditLobbyChannelLinkRequest.md) + - [EmbeddedActivityInstance](docs/EmbeddedActivityInstance.md) + - [EmbeddedActivityInstanceLocation](docs/EmbeddedActivityInstanceLocation.md) + - [EmojiResponse](docs/EmojiResponse.md) + - [EntitlementResponse](docs/EntitlementResponse.md) + - [EntityMetadataExternal](docs/EntityMetadataExternal.md) + - [EntityMetadataExternalResponse](docs/EntityMetadataExternalResponse.md) + - [Error](docs/Error.md) + - [ErrorDetails](docs/ErrorDetails.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [ExecuteWebhookRequest](docs/ExecuteWebhookRequest.md) + - [ExternalConnectionIntegrationResponse](docs/ExternalConnectionIntegrationResponse.md) + - [ExternalScheduledEventCreateRequest](docs/ExternalScheduledEventCreateRequest.md) + - [ExternalScheduledEventPatchRequestPartial](docs/ExternalScheduledEventPatchRequestPartial.md) + - [ExternalScheduledEventResponse](docs/ExternalScheduledEventResponse.md) + - [FileComponentForMessageRequest](docs/FileComponentForMessageRequest.md) + - [FileComponentResponse](docs/FileComponentResponse.md) + - [FlagToChannelAction](docs/FlagToChannelAction.md) + - [FlagToChannelActionMetadata](docs/FlagToChannelActionMetadata.md) + - [FlagToChannelActionMetadataResponse](docs/FlagToChannelActionMetadataResponse.md) + - [FlagToChannelActionResponse](docs/FlagToChannelActionResponse.md) + - [FollowChannelRequest](docs/FollowChannelRequest.md) + - [ForumTagResponse](docs/ForumTagResponse.md) + - [FriendInviteResponse](docs/FriendInviteResponse.md) + - [GatewayBotResponse](docs/GatewayBotResponse.md) + - [GatewayBotSessionStartLimitResponse](docs/GatewayBotSessionStartLimitResponse.md) + - [GatewayResponse](docs/GatewayResponse.md) + - [GetChannel200Response](docs/GetChannel200Response.md) + - [GetEntitlementsSkuIdsParameter](docs/GetEntitlementsSkuIdsParameter.md) + - [GetSticker200Response](docs/GetSticker200Response.md) + - [GithubAuthor](docs/GithubAuthor.md) + - [GithubCheckApp](docs/GithubCheckApp.md) + - [GithubCheckPullRequest](docs/GithubCheckPullRequest.md) + - [GithubCheckRun](docs/GithubCheckRun.md) + - [GithubCheckRunOutput](docs/GithubCheckRunOutput.md) + - [GithubCheckSuite](docs/GithubCheckSuite.md) + - [GithubComment](docs/GithubComment.md) + - [GithubCommit](docs/GithubCommit.md) + - [GithubDiscussion](docs/GithubDiscussion.md) + - [GithubIssue](docs/GithubIssue.md) + - [GithubRelease](docs/GithubRelease.md) + - [GithubRepository](docs/GithubRepository.md) + - [GithubReview](docs/GithubReview.md) + - [GithubUser](docs/GithubUser.md) + - [GithubWebhook](docs/GithubWebhook.md) + - [GroupDMInviteResponse](docs/GroupDMInviteResponse.md) + - [GuildAuditLogResponse](docs/GuildAuditLogResponse.md) + - [GuildAuditLogResponseIntegrationsInner](docs/GuildAuditLogResponseIntegrationsInner.md) + - [GuildBanResponse](docs/GuildBanResponse.md) + - [GuildChannelLocation](docs/GuildChannelLocation.md) + - [GuildChannelResponse](docs/GuildChannelResponse.md) + - [GuildCreateRequest](docs/GuildCreateRequest.md) + - [GuildHomeSettingsResponse](docs/GuildHomeSettingsResponse.md) + - [GuildIncomingWebhookResponse](docs/GuildIncomingWebhookResponse.md) + - [GuildInviteResponse](docs/GuildInviteResponse.md) + - [GuildMFALevelResponse](docs/GuildMFALevelResponse.md) + - [GuildMemberResponse](docs/GuildMemberResponse.md) + - [GuildOnboardingResponse](docs/GuildOnboardingResponse.md) + - [GuildPatchRequestPartial](docs/GuildPatchRequestPartial.md) + - [GuildPreviewResponse](docs/GuildPreviewResponse.md) + - [GuildProductPurchaseResponse](docs/GuildProductPurchaseResponse.md) + - [GuildPruneResponse](docs/GuildPruneResponse.md) + - [GuildResponse](docs/GuildResponse.md) + - [GuildRoleResponse](docs/GuildRoleResponse.md) + - [GuildRoleTagsResponse](docs/GuildRoleTagsResponse.md) + - [GuildStickerResponse](docs/GuildStickerResponse.md) + - [GuildSubscriptionIntegrationResponse](docs/GuildSubscriptionIntegrationResponse.md) + - [GuildTemplateChannelResponse](docs/GuildTemplateChannelResponse.md) + - [GuildTemplateChannelTags](docs/GuildTemplateChannelTags.md) + - [GuildTemplateResponse](docs/GuildTemplateResponse.md) + - [GuildTemplateRoleResponse](docs/GuildTemplateRoleResponse.md) + - [GuildTemplateSnapshotResponse](docs/GuildTemplateSnapshotResponse.md) + - [GuildWelcomeChannel](docs/GuildWelcomeChannel.md) + - [GuildWelcomeScreenChannelResponse](docs/GuildWelcomeScreenChannelResponse.md) + - [GuildWelcomeScreenResponse](docs/GuildWelcomeScreenResponse.md) + - [GuildWithCountsResponse](docs/GuildWithCountsResponse.md) + - [IncomingWebhookInteractionRequest](docs/IncomingWebhookInteractionRequest.md) + - [IncomingWebhookRequestPartial](docs/IncomingWebhookRequestPartial.md) + - [IncomingWebhookUpdateForInteractionCallbackRequestPartial](docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md) + - [IncomingWebhookUpdateRequestPartial](docs/IncomingWebhookUpdateRequestPartial.md) + - [InnerErrors](docs/InnerErrors.md) + - [IntegrationApplicationResponse](docs/IntegrationApplicationResponse.md) + - [InteractionApplicationCommandAutocompleteCallbackIntegerData](docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md) + - [InteractionApplicationCommandAutocompleteCallbackNumberData](docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md) + - [InteractionApplicationCommandAutocompleteCallbackStringData](docs/InteractionApplicationCommandAutocompleteCallbackStringData.md) + - [InteractionCallbackResponse](docs/InteractionCallbackResponse.md) + - [InteractionCallbackResponseResource](docs/InteractionCallbackResponseResource.md) + - [InteractionResponse](docs/InteractionResponse.md) + - [InviteApplicationResponse](docs/InviteApplicationResponse.md) + - [InviteChannelRecipientResponse](docs/InviteChannelRecipientResponse.md) + - [InviteChannelResponse](docs/InviteChannelResponse.md) + - [InviteGuildResponse](docs/InviteGuildResponse.md) + - [KeywordRuleResponse](docs/KeywordRuleResponse.md) + - [KeywordTriggerMetadata](docs/KeywordTriggerMetadata.md) + - [KeywordTriggerMetadataResponse](docs/KeywordTriggerMetadataResponse.md) + - [KeywordUpsertRequest](docs/KeywordUpsertRequest.md) + - [KeywordUpsertRequestPartial](docs/KeywordUpsertRequestPartial.md) + - [LaunchActivityInteractionCallbackRequest](docs/LaunchActivityInteractionCallbackRequest.md) + - [LaunchActivityInteractionCallbackResponse](docs/LaunchActivityInteractionCallbackResponse.md) + - [ListApplicationEmojisResponse](docs/ListApplicationEmojisResponse.md) + - [ListAutoModerationRules200ResponseInner](docs/ListAutoModerationRules200ResponseInner.md) + - [ListChannelInvites200ResponseInner](docs/ListChannelInvites200ResponseInner.md) + - [ListChannelWebhooks200ResponseInner](docs/ListChannelWebhooks200ResponseInner.md) + - [ListGuildIntegrations200ResponseInner](docs/ListGuildIntegrations200ResponseInner.md) + - [ListGuildScheduledEvents200ResponseInner](docs/ListGuildScheduledEvents200ResponseInner.md) + - [ListGuildSoundboardSoundsResponse](docs/ListGuildSoundboardSoundsResponse.md) + - [LobbyMemberRequest](docs/LobbyMemberRequest.md) + - [LobbyMemberResponse](docs/LobbyMemberResponse.md) + - [LobbyMessageResponse](docs/LobbyMessageResponse.md) + - [LobbyResponse](docs/LobbyResponse.md) + - [MLSpamRuleResponse](docs/MLSpamRuleResponse.md) + - [MLSpamUpsertRequest](docs/MLSpamUpsertRequest.md) + - [MLSpamUpsertRequestPartial](docs/MLSpamUpsertRequestPartial.md) + - [MediaGalleryComponentForMessageRequest](docs/MediaGalleryComponentForMessageRequest.md) + - [MediaGalleryComponentResponse](docs/MediaGalleryComponentResponse.md) + - [MediaGalleryItemRequest](docs/MediaGalleryItemRequest.md) + - [MediaGalleryItemResponse](docs/MediaGalleryItemResponse.md) + - [MentionSpamRuleResponse](docs/MentionSpamRuleResponse.md) + - [MentionSpamTriggerMetadata](docs/MentionSpamTriggerMetadata.md) + - [MentionSpamTriggerMetadataResponse](docs/MentionSpamTriggerMetadataResponse.md) + - [MentionSpamUpsertRequest](docs/MentionSpamUpsertRequest.md) + - [MentionSpamUpsertRequestPartial](docs/MentionSpamUpsertRequestPartial.md) + - [MentionableSelectComponentForMessageRequest](docs/MentionableSelectComponentForMessageRequest.md) + - [MentionableSelectComponentForMessageRequestDefaultValuesInner](docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md) + - [MentionableSelectComponentResponse](docs/MentionableSelectComponentResponse.md) + - [MentionableSelectComponentResponseDefaultValuesInner](docs/MentionableSelectComponentResponseDefaultValuesInner.md) + - [MessageAllowedMentionsRequest](docs/MessageAllowedMentionsRequest.md) + - [MessageAttachmentRequest](docs/MessageAttachmentRequest.md) + - [MessageAttachmentResponse](docs/MessageAttachmentResponse.md) + - [MessageCallResponse](docs/MessageCallResponse.md) + - [MessageComponentInteractionMetadataResponse](docs/MessageComponentInteractionMetadataResponse.md) + - [MessageCreateRequest](docs/MessageCreateRequest.md) + - [MessageEditRequestPartial](docs/MessageEditRequestPartial.md) + - [MessageEmbedAuthorResponse](docs/MessageEmbedAuthorResponse.md) + - [MessageEmbedFieldResponse](docs/MessageEmbedFieldResponse.md) + - [MessageEmbedFooterResponse](docs/MessageEmbedFooterResponse.md) + - [MessageEmbedImageResponse](docs/MessageEmbedImageResponse.md) + - [MessageEmbedProviderResponse](docs/MessageEmbedProviderResponse.md) + - [MessageEmbedResponse](docs/MessageEmbedResponse.md) + - [MessageEmbedVideoResponse](docs/MessageEmbedVideoResponse.md) + - [MessageInteractionResponse](docs/MessageInteractionResponse.md) + - [MessageMentionChannelResponse](docs/MessageMentionChannelResponse.md) + - [MessageReactionCountDetailsResponse](docs/MessageReactionCountDetailsResponse.md) + - [MessageReactionEmojiResponse](docs/MessageReactionEmojiResponse.md) + - [MessageReactionResponse](docs/MessageReactionResponse.md) + - [MessageReferenceRequest](docs/MessageReferenceRequest.md) + - [MessageReferenceResponse](docs/MessageReferenceResponse.md) + - [MessageResponse](docs/MessageResponse.md) + - [MessageRoleSubscriptionDataResponse](docs/MessageRoleSubscriptionDataResponse.md) + - [MessageSnapshotResponse](docs/MessageSnapshotResponse.md) + - [MessageStickerItemResponse](docs/MessageStickerItemResponse.md) + - [MinimalContentMessageResponse](docs/MinimalContentMessageResponse.md) + - [ModalInteractionCallbackRequest](docs/ModalInteractionCallbackRequest.md) + - [ModalInteractionCallbackRequestData](docs/ModalInteractionCallbackRequestData.md) + - [ModalSubmitInteractionMetadataResponse](docs/ModalSubmitInteractionMetadataResponse.md) + - [ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata](docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md) + - [MyGuildResponse](docs/MyGuildResponse.md) + - [NewMemberActionResponse](docs/NewMemberActionResponse.md) + - [OAuth2GetAuthorizationResponse](docs/OAuth2GetAuthorizationResponse.md) + - [OAuth2GetKeys](docs/OAuth2GetKeys.md) + - [OAuth2GetOpenIDConnectUserInfoResponse](docs/OAuth2GetOpenIDConnectUserInfoResponse.md) + - [OAuth2Key](docs/OAuth2Key.md) + - [OnboardingPromptOptionRequest](docs/OnboardingPromptOptionRequest.md) + - [OnboardingPromptOptionResponse](docs/OnboardingPromptOptionResponse.md) + - [OnboardingPromptResponse](docs/OnboardingPromptResponse.md) + - [PartialDiscordIntegrationResponse](docs/PartialDiscordIntegrationResponse.md) + - [PartialExternalConnectionIntegrationResponse](docs/PartialExternalConnectionIntegrationResponse.md) + - [PartialGuildSubscriptionIntegrationResponse](docs/PartialGuildSubscriptionIntegrationResponse.md) + - [PartnerSdkUnmergeProvisionalAccountRequest](docs/PartnerSdkUnmergeProvisionalAccountRequest.md) + - [PinnedMessageResponse](docs/PinnedMessageResponse.md) + - [PinnedMessagesResponse](docs/PinnedMessagesResponse.md) + - [PollAnswerCreateRequest](docs/PollAnswerCreateRequest.md) + - [PollAnswerDetailsResponse](docs/PollAnswerDetailsResponse.md) + - [PollAnswerResponse](docs/PollAnswerResponse.md) + - [PollCreateRequest](docs/PollCreateRequest.md) + - [PollEmoji](docs/PollEmoji.md) + - [PollEmojiCreateRequest](docs/PollEmojiCreateRequest.md) + - [PollMedia](docs/PollMedia.md) + - [PollMediaCreateRequest](docs/PollMediaCreateRequest.md) + - [PollMediaResponse](docs/PollMediaResponse.md) + - [PollResponse](docs/PollResponse.md) + - [PollResultsEntryResponse](docs/PollResultsEntryResponse.md) + - [PollResultsResponse](docs/PollResultsResponse.md) + - [PongInteractionCallbackRequest](docs/PongInteractionCallbackRequest.md) + - [PrivateApplicationResponse](docs/PrivateApplicationResponse.md) + - [PrivateChannelLocation](docs/PrivateChannelLocation.md) + - [PrivateChannelResponse](docs/PrivateChannelResponse.md) + - [PrivateGroupChannelResponse](docs/PrivateGroupChannelResponse.md) + - [PrivateGuildMemberResponse](docs/PrivateGuildMemberResponse.md) + - [ProvisionalTokenResponse](docs/ProvisionalTokenResponse.md) + - [PruneGuildRequest](docs/PruneGuildRequest.md) + - [PruneGuildRequestIncludeRoles](docs/PruneGuildRequestIncludeRoles.md) + - [PurchaseNotificationResponse](docs/PurchaseNotificationResponse.md) + - [QuarantineUserAction](docs/QuarantineUserAction.md) + - [QuarantineUserActionResponse](docs/QuarantineUserActionResponse.md) + - [ResolvedObjectsResponse](docs/ResolvedObjectsResponse.md) + - [ResourceChannelResponse](docs/ResourceChannelResponse.md) + - [RichEmbed](docs/RichEmbed.md) + - [RichEmbedAuthor](docs/RichEmbedAuthor.md) + - [RichEmbedField](docs/RichEmbedField.md) + - [RichEmbedFooter](docs/RichEmbedFooter.md) + - [RichEmbedImage](docs/RichEmbedImage.md) + - [RichEmbedProvider](docs/RichEmbedProvider.md) + - [RichEmbedThumbnail](docs/RichEmbedThumbnail.md) + - [RichEmbedVideo](docs/RichEmbedVideo.md) + - [RoleSelectComponentForMessageRequest](docs/RoleSelectComponentForMessageRequest.md) + - [RoleSelectComponentResponse](docs/RoleSelectComponentResponse.md) + - [RoleSelectDefaultValue](docs/RoleSelectDefaultValue.md) + - [RoleSelectDefaultValueResponse](docs/RoleSelectDefaultValueResponse.md) + - [SDKMessageRequest](docs/SDKMessageRequest.md) + - [ScheduledEventResponse](docs/ScheduledEventResponse.md) + - [ScheduledEventUserResponse](docs/ScheduledEventUserResponse.md) + - [SectionComponentForMessageRequest](docs/SectionComponentForMessageRequest.md) + - [SectionComponentForMessageRequestAccessory](docs/SectionComponentForMessageRequestAccessory.md) + - [SectionComponentResponse](docs/SectionComponentResponse.md) + - [SectionComponentResponseAccessory](docs/SectionComponentResponseAccessory.md) + - [SeparatorComponentForMessageRequest](docs/SeparatorComponentForMessageRequest.md) + - [SeparatorComponentResponse](docs/SeparatorComponentResponse.md) + - [SetChannelPermissionOverwriteRequest](docs/SetChannelPermissionOverwriteRequest.md) + - [SetGuildApplicationCommandPermissionsRequest](docs/SetGuildApplicationCommandPermissionsRequest.md) + - [SetGuildMfaLevelRequest](docs/SetGuildMfaLevelRequest.md) + - [SettingsEmojiResponse](docs/SettingsEmojiResponse.md) + - [SlackWebhook](docs/SlackWebhook.md) + - [SoundboardCreateRequest](docs/SoundboardCreateRequest.md) + - [SoundboardPatchRequestPartial](docs/SoundboardPatchRequestPartial.md) + - [SoundboardSoundResponse](docs/SoundboardSoundResponse.md) + - [SoundboardSoundSendRequest](docs/SoundboardSoundSendRequest.md) + - [SpamLinkRuleResponse](docs/SpamLinkRuleResponse.md) + - [StageInstanceResponse](docs/StageInstanceResponse.md) + - [StageScheduledEventCreateRequest](docs/StageScheduledEventCreateRequest.md) + - [StageScheduledEventPatchRequestPartial](docs/StageScheduledEventPatchRequestPartial.md) + - [StageScheduledEventResponse](docs/StageScheduledEventResponse.md) + - [StandardStickerResponse](docs/StandardStickerResponse.md) + - [StickerPackCollectionResponse](docs/StickerPackCollectionResponse.md) + - [StickerPackResponse](docs/StickerPackResponse.md) + - [StringSelectComponentForMessageRequest](docs/StringSelectComponentForMessageRequest.md) + - [StringSelectComponentResponse](docs/StringSelectComponentResponse.md) + - [StringSelectOptionForMessageRequest](docs/StringSelectOptionForMessageRequest.md) + - [StringSelectOptionResponse](docs/StringSelectOptionResponse.md) + - [TeamMemberResponse](docs/TeamMemberResponse.md) + - [TeamResponse](docs/TeamResponse.md) + - [TextDisplayComponentForMessageRequest](docs/TextDisplayComponentForMessageRequest.md) + - [TextDisplayComponentResponse](docs/TextDisplayComponentResponse.md) + - [TextInputComponentForModalRequest](docs/TextInputComponentForModalRequest.md) + - [TextInputComponentResponse](docs/TextInputComponentResponse.md) + - [ThreadMemberResponse](docs/ThreadMemberResponse.md) + - [ThreadMetadataResponse](docs/ThreadMetadataResponse.md) + - [ThreadResponse](docs/ThreadResponse.md) + - [ThreadSearchResponse](docs/ThreadSearchResponse.md) + - [ThreadSearchTagParameter](docs/ThreadSearchTagParameter.md) + - [ThreadsResponse](docs/ThreadsResponse.md) + - [ThumbnailComponentForMessageRequest](docs/ThumbnailComponentForMessageRequest.md) + - [ThumbnailComponentResponse](docs/ThumbnailComponentResponse.md) + - [UnfurledMediaRequest](docs/UnfurledMediaRequest.md) + - [UnfurledMediaRequestWithAttachmentReferenceRequired](docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md) + - [UnfurledMediaResponse](docs/UnfurledMediaResponse.md) + - [UpdateApplicationEmojiRequest](docs/UpdateApplicationEmojiRequest.md) + - [UpdateApplicationUserRoleConnectionRequest](docs/UpdateApplicationUserRoleConnectionRequest.md) + - [UpdateAutoModerationRuleRequest](docs/UpdateAutoModerationRuleRequest.md) + - [UpdateChannelRequest](docs/UpdateChannelRequest.md) + - [UpdateDMRequestPartial](docs/UpdateDMRequestPartial.md) + - [UpdateDefaultReactionEmojiRequest](docs/UpdateDefaultReactionEmojiRequest.md) + - [UpdateGroupDMRequestPartial](docs/UpdateGroupDMRequestPartial.md) + - [UpdateGuildChannelRequestPartial](docs/UpdateGuildChannelRequestPartial.md) + - [UpdateGuildEmojiRequest](docs/UpdateGuildEmojiRequest.md) + - [UpdateGuildMemberRequest](docs/UpdateGuildMemberRequest.md) + - [UpdateGuildOnboardingRequest](docs/UpdateGuildOnboardingRequest.md) + - [UpdateGuildScheduledEventRequest](docs/UpdateGuildScheduledEventRequest.md) + - [UpdateGuildStickerRequest](docs/UpdateGuildStickerRequest.md) + - [UpdateGuildTemplateRequest](docs/UpdateGuildTemplateRequest.md) + - [UpdateGuildWidgetSettingsRequest](docs/UpdateGuildWidgetSettingsRequest.md) + - [UpdateMessageInteractionCallbackRequest](docs/UpdateMessageInteractionCallbackRequest.md) + - [UpdateMessageInteractionCallbackResponse](docs/UpdateMessageInteractionCallbackResponse.md) + - [UpdateMyGuildMemberRequest](docs/UpdateMyGuildMemberRequest.md) + - [UpdateOnboardingPromptRequest](docs/UpdateOnboardingPromptRequest.md) + - [UpdateSelfVoiceStateRequest](docs/UpdateSelfVoiceStateRequest.md) + - [UpdateStageInstanceRequest](docs/UpdateStageInstanceRequest.md) + - [UpdateThreadRequestPartial](docs/UpdateThreadRequestPartial.md) + - [UpdateThreadTagRequest](docs/UpdateThreadTagRequest.md) + - [UpdateVoiceStateRequest](docs/UpdateVoiceStateRequest.md) + - [UpdateWebhookByTokenRequest](docs/UpdateWebhookByTokenRequest.md) + - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) + - [UserAvatarDecorationResponse](docs/UserAvatarDecorationResponse.md) + - [UserCollectiblesResponse](docs/UserCollectiblesResponse.md) + - [UserCommunicationDisabledAction](docs/UserCommunicationDisabledAction.md) + - [UserCommunicationDisabledActionMetadata](docs/UserCommunicationDisabledActionMetadata.md) + - [UserCommunicationDisabledActionMetadataResponse](docs/UserCommunicationDisabledActionMetadataResponse.md) + - [UserCommunicationDisabledActionResponse](docs/UserCommunicationDisabledActionResponse.md) + - [UserGuildOnboardingResponse](docs/UserGuildOnboardingResponse.md) + - [UserNameplateResponse](docs/UserNameplateResponse.md) + - [UserPIIResponse](docs/UserPIIResponse.md) + - [UserPrimaryGuildResponse](docs/UserPrimaryGuildResponse.md) + - [UserResponse](docs/UserResponse.md) + - [UserSelectComponentForMessageRequest](docs/UserSelectComponentForMessageRequest.md) + - [UserSelectComponentResponse](docs/UserSelectComponentResponse.md) + - [UserSelectDefaultValue](docs/UserSelectDefaultValue.md) + - [UserSelectDefaultValueResponse](docs/UserSelectDefaultValueResponse.md) + - [VanityURLErrorResponse](docs/VanityURLErrorResponse.md) + - [VanityURLResponse](docs/VanityURLResponse.md) + - [VoiceRegionResponse](docs/VoiceRegionResponse.md) + - [VoiceScheduledEventCreateRequest](docs/VoiceScheduledEventCreateRequest.md) + - [VoiceScheduledEventPatchRequestPartial](docs/VoiceScheduledEventPatchRequestPartial.md) + - [VoiceScheduledEventResponse](docs/VoiceScheduledEventResponse.md) + - [VoiceStateResponse](docs/VoiceStateResponse.md) + - [WebhookSlackEmbed](docs/WebhookSlackEmbed.md) + - [WebhookSlackEmbedField](docs/WebhookSlackEmbedField.md) + - [WebhookSourceChannelResponse](docs/WebhookSourceChannelResponse.md) + - [WebhookSourceGuildResponse](docs/WebhookSourceGuildResponse.md) + - [WelcomeMessageResponse](docs/WelcomeMessageResponse.md) + - [WelcomeScreenPatchRequestPartial](docs/WelcomeScreenPatchRequestPartial.md) + - [WidgetActivity](docs/WidgetActivity.md) + - [WidgetChannel](docs/WidgetChannel.md) + - [WidgetMember](docs/WidgetMember.md) + - [WidgetResponse](docs/WidgetResponse.md) + - [WidgetSettingsResponse](docs/WidgetSettingsResponse.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BotToken + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + + +### OAuth2 + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: https://discord.com/api/oauth2/authorize +- **Scopes**: + - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval + - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **applications.builds.read**: allows your app to read build data for a user's applications + - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval + - **applications.commands**: allows your app to use commands in a guild + - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to + - **applications.entitlements**: allows your app to read entitlements for a user's applications + - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications + - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default + - **connections**: allows /users/@me/connections to return linked third-party accounts + - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval + - **email**: enables /users/@me to return an email + - **gdm.join**: allows your app to join users to a group dm + - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds + - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild + - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild + - **identify**: allows /users/@me without email + - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) + - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information + - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval + - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval + - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval + - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval + - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval + - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval + - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval + - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval + - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval + - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval + - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval + - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants + + +### OAuth2 + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval + - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **applications.builds.read**: allows your app to read build data for a user's applications + - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval + - **applications.commands**: allows your app to use commands in a guild + - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to + - **applications.commands.update**: allows your app to update its commands using a Bearer token - client credentials grant only + - **applications.entitlements**: allows your app to read entitlements for a user's applications + - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications + - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default + - **connections**: allows /users/@me/connections to return linked third-party accounts + - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval + - **email**: enables /users/@me to return an email + - **gdm.join**: allows your app to join users to a group dm + - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds + - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild + - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild + - **identify**: allows /users/@me without email + - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) + - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information + - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval + - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval + - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval + - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval + - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval + - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval + - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval + - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval + - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval + - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval + - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval + - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants + + +### OAuth2 + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://discord.com/api/oauth2/authorize +- **Scopes**: + - **activities.invites.write**: allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **activities.read**: allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval + - **activities.write**: allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) + - **applications.builds.read**: allows your app to read build data for a user's applications + - **applications.builds.upload**: allows your app to upload/update builds for a user's applications - requires Discord approval + - **applications.commands**: allows your app to use commands in a guild + - **applications.commands.permissions.update**: allows your app to update permissions for its commands in a guild a user has permissions to + - **applications.entitlements**: allows your app to read entitlements for a user's applications + - **applications.store.update**: allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications + - **bot**: for oauth2 bots, this puts the bot in the user's selected guild by default + - **connections**: allows /users/@me/connections to return linked third-party accounts + - **dm_channels.read**: allows your app to see information about the user's DMs and group DMs - requires Discord approval + - **email**: enables /users/@me to return an email + - **gdm.join**: allows your app to join users to a group dm + - **guilds**: allows /users/@me/guilds to return basic information about all of a user's guilds + - **guilds.join**: allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild + - **guilds.members.read**: allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild + - **identify**: allows /users/@me without email + - **messages.read**: for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) + - **openid**: for OpenID Connect, this allows your app to receive user id and basic profile information + - **relationships.read**: allows your app to know a user's friends and implicit relationships - requires Discord approval + - **role_connections.write**: allows your app to update a user's connection and metadata for the app + - **rpc**: for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval + - **rpc.activities.write**: for local rpc server access, this allows you to update a user's activity - requires Discord approval + - **rpc.notifications.read**: for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval + - **rpc.screenshare.read**: for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval + - **rpc.screenshare.write**: for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval + - **rpc.video.read**: for local rpc server access, this allows you to read a user's video status - requires Discord approval + - **rpc.video.write**: for local rpc server access, this allows you to update a user's video settings - requires Discord approval + - **rpc.voice.read**: for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval + - **rpc.voice.write**: for local rpc server access, this allows you to update a user's voice settings - requires Discord approval + - **voice**: allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval + - **webhook.incoming**: this generates a webhook that is returned in the oauth token response for authorization code grants + + +## Author + + + + diff --git a/dc_rest/__init__.py b/dc_rest/__init__.py new file mode 100644 index 0000000..7e0d08b --- /dev/null +++ b/dc_rest/__init__.py @@ -0,0 +1,999 @@ +# coding: utf-8 + +# flake8: noqa + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +__version__ = "10" + +# Define package exports +__all__ = [ + "DefaultApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AccountResponse", + "ActionRowComponentForMessageRequest", + "ActionRowComponentForMessageRequestComponentsInner", + "ActionRowComponentForModalRequest", + "ActionRowComponentResponse", + "ActionRowComponentResponseComponentsInner", + "ActivitiesAttachmentResponse", + "AddGroupDmUser201Response", + "AddGroupDmUserRequest", + "AddGuildMemberRequest", + "AddLobbyMemberRequest", + "ApplicationCommandAttachmentOption", + "ApplicationCommandAttachmentOptionResponse", + "ApplicationCommandAutocompleteCallbackRequest", + "ApplicationCommandAutocompleteCallbackRequestData", + "ApplicationCommandBooleanOption", + "ApplicationCommandBooleanOptionResponse", + "ApplicationCommandChannelOption", + "ApplicationCommandChannelOptionResponse", + "ApplicationCommandCreateRequest", + "ApplicationCommandCreateRequestOptionsInner", + "ApplicationCommandIntegerOption", + "ApplicationCommandIntegerOptionResponse", + "ApplicationCommandInteractionMetadataResponse", + "ApplicationCommandMentionableOption", + "ApplicationCommandMentionableOptionResponse", + "ApplicationCommandNumberOption", + "ApplicationCommandNumberOptionResponse", + "ApplicationCommandOptionIntegerChoice", + "ApplicationCommandOptionIntegerChoiceResponse", + "ApplicationCommandOptionNumberChoice", + "ApplicationCommandOptionNumberChoiceResponse", + "ApplicationCommandOptionStringChoice", + "ApplicationCommandOptionStringChoiceResponse", + "ApplicationCommandPatchRequestPartial", + "ApplicationCommandPermission", + "ApplicationCommandResponse", + "ApplicationCommandResponseOptionsInner", + "ApplicationCommandRoleOption", + "ApplicationCommandRoleOptionResponse", + "ApplicationCommandStringOption", + "ApplicationCommandStringOptionResponse", + "ApplicationCommandSubcommandGroupOption", + "ApplicationCommandSubcommandGroupOptionResponse", + "ApplicationCommandSubcommandOption", + "ApplicationCommandSubcommandOptionOptionsInner", + "ApplicationCommandSubcommandOptionResponse", + "ApplicationCommandSubcommandOptionResponseOptionsInner", + "ApplicationCommandUpdateRequest", + "ApplicationCommandUserOption", + "ApplicationCommandUserOptionResponse", + "ApplicationFormPartial", + "ApplicationFormPartialDescription", + "ApplicationFormPartialIntegrationTypesConfigValue", + "ApplicationIncomingWebhookResponse", + "ApplicationIntegrationTypeConfiguration", + "ApplicationIntegrationTypeConfigurationResponse", + "ApplicationOAuth2InstallParams", + "ApplicationOAuth2InstallParamsResponse", + "ApplicationResponse", + "ApplicationRoleConnectionsMetadataItemRequest", + "ApplicationRoleConnectionsMetadataItemResponse", + "ApplicationUserRoleConnectionResponse", + "AttachmentResponse", + "AuditLogEntryResponse", + "AuditLogObjectChangeResponse", + "BanUserFromGuildRequest", + "BaseCreateMessageCreateRequest", + "BaseCreateMessageCreateRequestComponentsInner", + "BasicApplicationResponse", + "BasicMessageResponse", + "BasicMessageResponseComponentsInner", + "BasicMessageResponseInteractionMetadata", + "BasicMessageResponseNonce", + "BlockMessageAction", + "BlockMessageActionMetadata", + "BlockMessageActionMetadataResponse", + "BlockMessageActionResponse", + "BotAccountPatchRequest", + "BulkBanUsersFromGuildRequest", + "BulkBanUsersResponse", + "BulkDeleteMessagesRequest", + "BulkLobbyMemberRequest", + "BulkUpdateGuildChannelsRequestInner", + "BulkUpdateGuildRolesRequestInner", + "ButtonComponentForMessageRequest", + "ButtonComponentResponse", + "ChannelFollowerResponse", + "ChannelFollowerWebhookResponse", + "ChannelPermissionOverwriteRequest", + "ChannelPermissionOverwriteResponse", + "ChannelSelectComponentForMessageRequest", + "ChannelSelectComponentResponse", + "ChannelSelectDefaultValue", + "ChannelSelectDefaultValueResponse", + "CommandPermissionResponse", + "CommandPermissionsResponse", + "ComponentEmojiForMessageRequest", + "ComponentEmojiResponse", + "ConnectedAccountGuildResponse", + "ConnectedAccountIntegrationResponse", + "ConnectedAccountResponse", + "ContainerComponentForMessageRequest", + "ContainerComponentForMessageRequestComponentsInner", + "ContainerComponentResponse", + "ContainerComponentResponseComponentsInner", + "CreateApplicationEmojiRequest", + "CreateAutoModerationRule200Response", + "CreateAutoModerationRuleRequest", + "CreateChannelInviteRequest", + "CreateEntitlementRequestData", + "CreateForumThreadRequest", + "CreateGroupDMInviteRequest", + "CreateGuildChannelRequest", + "CreateGuildEmojiRequest", + "CreateGuildFromTemplateRequest", + "CreateGuildInviteRequest", + "CreateGuildRequestChannelItem", + "CreateGuildRequestRoleItem", + "CreateGuildRoleRequest", + "CreateGuildScheduledEventRequest", + "CreateGuildTemplateRequest", + "CreateInteractionResponseRequest", + "CreateLobbyRequest", + "CreateMessageInteractionCallbackRequest", + "CreateMessageInteractionCallbackResponse", + "CreateOrJoinLobbyRequest", + "CreateOrUpdateThreadTagRequest", + "CreatePrivateChannelRequest", + "CreateStageInstanceRequest", + "CreateTextThreadWithMessageRequest", + "CreateTextThreadWithoutMessageRequest", + "CreateThreadRequest", + "CreateWebhookRequest", + "CreatedThreadResponse", + "DefaultKeywordListTriggerMetadata", + "DefaultKeywordListTriggerMetadataResponse", + "DefaultKeywordListUpsertRequest", + "DefaultKeywordListUpsertRequestActionsInner", + "DefaultKeywordListUpsertRequestPartial", + "DefaultKeywordRuleResponse", + "DefaultKeywordRuleResponseActionsInner", + "DefaultReactionEmojiResponse", + "DiscordIntegrationResponse", + "EditLobbyChannelLinkRequest", + "EmbeddedActivityInstance", + "EmbeddedActivityInstanceLocation", + "EmojiResponse", + "EntitlementResponse", + "EntityMetadataExternal", + "EntityMetadataExternalResponse", + "Error", + "ErrorDetails", + "ErrorResponse", + "ExecuteWebhookRequest", + "ExternalConnectionIntegrationResponse", + "ExternalScheduledEventCreateRequest", + "ExternalScheduledEventPatchRequestPartial", + "ExternalScheduledEventResponse", + "FileComponentForMessageRequest", + "FileComponentResponse", + "FlagToChannelAction", + "FlagToChannelActionMetadata", + "FlagToChannelActionMetadataResponse", + "FlagToChannelActionResponse", + "FollowChannelRequest", + "ForumTagResponse", + "FriendInviteResponse", + "GatewayBotResponse", + "GatewayBotSessionStartLimitResponse", + "GatewayResponse", + "GetChannel200Response", + "GetEntitlementsSkuIdsParameter", + "GetSticker200Response", + "GithubAuthor", + "GithubCheckApp", + "GithubCheckPullRequest", + "GithubCheckRun", + "GithubCheckRunOutput", + "GithubCheckSuite", + "GithubComment", + "GithubCommit", + "GithubDiscussion", + "GithubIssue", + "GithubRelease", + "GithubRepository", + "GithubReview", + "GithubUser", + "GithubWebhook", + "GroupDMInviteResponse", + "GuildAuditLogResponse", + "GuildAuditLogResponseIntegrationsInner", + "GuildBanResponse", + "GuildChannelLocation", + "GuildChannelResponse", + "GuildCreateRequest", + "GuildHomeSettingsResponse", + "GuildIncomingWebhookResponse", + "GuildInviteResponse", + "GuildMFALevelResponse", + "GuildMemberResponse", + "GuildOnboardingResponse", + "GuildPatchRequestPartial", + "GuildPreviewResponse", + "GuildProductPurchaseResponse", + "GuildPruneResponse", + "GuildResponse", + "GuildRoleResponse", + "GuildRoleTagsResponse", + "GuildStickerResponse", + "GuildSubscriptionIntegrationResponse", + "GuildTemplateChannelResponse", + "GuildTemplateChannelTags", + "GuildTemplateResponse", + "GuildTemplateRoleResponse", + "GuildTemplateSnapshotResponse", + "GuildWelcomeChannel", + "GuildWelcomeScreenChannelResponse", + "GuildWelcomeScreenResponse", + "GuildWithCountsResponse", + "IncomingWebhookInteractionRequest", + "IncomingWebhookRequestPartial", + "IncomingWebhookUpdateForInteractionCallbackRequestPartial", + "IncomingWebhookUpdateRequestPartial", + "InnerErrors", + "IntegrationApplicationResponse", + "InteractionApplicationCommandAutocompleteCallbackIntegerData", + "InteractionApplicationCommandAutocompleteCallbackNumberData", + "InteractionApplicationCommandAutocompleteCallbackStringData", + "InteractionCallbackResponse", + "InteractionCallbackResponseResource", + "InteractionResponse", + "InviteApplicationResponse", + "InviteChannelRecipientResponse", + "InviteChannelResponse", + "InviteGuildResponse", + "KeywordRuleResponse", + "KeywordTriggerMetadata", + "KeywordTriggerMetadataResponse", + "KeywordUpsertRequest", + "KeywordUpsertRequestPartial", + "LaunchActivityInteractionCallbackRequest", + "LaunchActivityInteractionCallbackResponse", + "ListApplicationEmojisResponse", + "ListAutoModerationRules200ResponseInner", + "ListChannelInvites200ResponseInner", + "ListChannelWebhooks200ResponseInner", + "ListGuildIntegrations200ResponseInner", + "ListGuildScheduledEvents200ResponseInner", + "ListGuildSoundboardSoundsResponse", + "LobbyMemberRequest", + "LobbyMemberResponse", + "LobbyMessageResponse", + "LobbyResponse", + "MLSpamRuleResponse", + "MLSpamUpsertRequest", + "MLSpamUpsertRequestPartial", + "MediaGalleryComponentForMessageRequest", + "MediaGalleryComponentResponse", + "MediaGalleryItemRequest", + "MediaGalleryItemResponse", + "MentionSpamRuleResponse", + "MentionSpamTriggerMetadata", + "MentionSpamTriggerMetadataResponse", + "MentionSpamUpsertRequest", + "MentionSpamUpsertRequestPartial", + "MentionableSelectComponentForMessageRequest", + "MentionableSelectComponentForMessageRequestDefaultValuesInner", + "MentionableSelectComponentResponse", + "MentionableSelectComponentResponseDefaultValuesInner", + "MessageAllowedMentionsRequest", + "MessageAttachmentRequest", + "MessageAttachmentResponse", + "MessageCallResponse", + "MessageComponentInteractionMetadataResponse", + "MessageCreateRequest", + "MessageEditRequestPartial", + "MessageEmbedAuthorResponse", + "MessageEmbedFieldResponse", + "MessageEmbedFooterResponse", + "MessageEmbedImageResponse", + "MessageEmbedProviderResponse", + "MessageEmbedResponse", + "MessageEmbedVideoResponse", + "MessageInteractionResponse", + "MessageMentionChannelResponse", + "MessageReactionCountDetailsResponse", + "MessageReactionEmojiResponse", + "MessageReactionResponse", + "MessageReferenceRequest", + "MessageReferenceResponse", + "MessageResponse", + "MessageRoleSubscriptionDataResponse", + "MessageSnapshotResponse", + "MessageStickerItemResponse", + "MinimalContentMessageResponse", + "ModalInteractionCallbackRequest", + "ModalInteractionCallbackRequestData", + "ModalSubmitInteractionMetadataResponse", + "ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata", + "MyGuildResponse", + "NewMemberActionResponse", + "OAuth2GetAuthorizationResponse", + "OAuth2GetKeys", + "OAuth2GetOpenIDConnectUserInfoResponse", + "OAuth2Key", + "OnboardingPromptOptionRequest", + "OnboardingPromptOptionResponse", + "OnboardingPromptResponse", + "PartialDiscordIntegrationResponse", + "PartialExternalConnectionIntegrationResponse", + "PartialGuildSubscriptionIntegrationResponse", + "PartnerSdkUnmergeProvisionalAccountRequest", + "PinnedMessageResponse", + "PinnedMessagesResponse", + "PollAnswerCreateRequest", + "PollAnswerDetailsResponse", + "PollAnswerResponse", + "PollCreateRequest", + "PollEmoji", + "PollEmojiCreateRequest", + "PollMedia", + "PollMediaCreateRequest", + "PollMediaResponse", + "PollResponse", + "PollResultsEntryResponse", + "PollResultsResponse", + "PongInteractionCallbackRequest", + "PrivateApplicationResponse", + "PrivateChannelLocation", + "PrivateChannelResponse", + "PrivateGroupChannelResponse", + "PrivateGuildMemberResponse", + "ProvisionalTokenResponse", + "PruneGuildRequest", + "PruneGuildRequestIncludeRoles", + "PurchaseNotificationResponse", + "QuarantineUserAction", + "QuarantineUserActionResponse", + "ResolvedObjectsResponse", + "ResourceChannelResponse", + "RichEmbed", + "RichEmbedAuthor", + "RichEmbedField", + "RichEmbedFooter", + "RichEmbedImage", + "RichEmbedProvider", + "RichEmbedThumbnail", + "RichEmbedVideo", + "RoleSelectComponentForMessageRequest", + "RoleSelectComponentResponse", + "RoleSelectDefaultValue", + "RoleSelectDefaultValueResponse", + "SDKMessageRequest", + "ScheduledEventResponse", + "ScheduledEventUserResponse", + "SectionComponentForMessageRequest", + "SectionComponentForMessageRequestAccessory", + "SectionComponentResponse", + "SectionComponentResponseAccessory", + "SeparatorComponentForMessageRequest", + "SeparatorComponentResponse", + "SetChannelPermissionOverwriteRequest", + "SetGuildApplicationCommandPermissionsRequest", + "SetGuildMfaLevelRequest", + "SettingsEmojiResponse", + "SlackWebhook", + "SoundboardCreateRequest", + "SoundboardPatchRequestPartial", + "SoundboardSoundResponse", + "SoundboardSoundSendRequest", + "SpamLinkRuleResponse", + "StageInstanceResponse", + "StageScheduledEventCreateRequest", + "StageScheduledEventPatchRequestPartial", + "StageScheduledEventResponse", + "StandardStickerResponse", + "StickerPackCollectionResponse", + "StickerPackResponse", + "StringSelectComponentForMessageRequest", + "StringSelectComponentResponse", + "StringSelectOptionForMessageRequest", + "StringSelectOptionResponse", + "TeamMemberResponse", + "TeamResponse", + "TextDisplayComponentForMessageRequest", + "TextDisplayComponentResponse", + "TextInputComponentForModalRequest", + "TextInputComponentResponse", + "ThreadMemberResponse", + "ThreadMetadataResponse", + "ThreadResponse", + "ThreadSearchResponse", + "ThreadSearchTagParameter", + "ThreadsResponse", + "ThumbnailComponentForMessageRequest", + "ThumbnailComponentResponse", + "UnfurledMediaRequest", + "UnfurledMediaRequestWithAttachmentReferenceRequired", + "UnfurledMediaResponse", + "UpdateApplicationEmojiRequest", + "UpdateApplicationUserRoleConnectionRequest", + "UpdateAutoModerationRuleRequest", + "UpdateChannelRequest", + "UpdateDMRequestPartial", + "UpdateDefaultReactionEmojiRequest", + "UpdateGroupDMRequestPartial", + "UpdateGuildChannelRequestPartial", + "UpdateGuildEmojiRequest", + "UpdateGuildMemberRequest", + "UpdateGuildOnboardingRequest", + "UpdateGuildScheduledEventRequest", + "UpdateGuildStickerRequest", + "UpdateGuildTemplateRequest", + "UpdateGuildWidgetSettingsRequest", + "UpdateMessageInteractionCallbackRequest", + "UpdateMessageInteractionCallbackResponse", + "UpdateMyGuildMemberRequest", + "UpdateOnboardingPromptRequest", + "UpdateSelfVoiceStateRequest", + "UpdateStageInstanceRequest", + "UpdateThreadRequestPartial", + "UpdateThreadTagRequest", + "UpdateVoiceStateRequest", + "UpdateWebhookByTokenRequest", + "UpdateWebhookRequest", + "UserAvatarDecorationResponse", + "UserCollectiblesResponse", + "UserCommunicationDisabledAction", + "UserCommunicationDisabledActionMetadata", + "UserCommunicationDisabledActionMetadataResponse", + "UserCommunicationDisabledActionResponse", + "UserGuildOnboardingResponse", + "UserNameplateResponse", + "UserPIIResponse", + "UserPrimaryGuildResponse", + "UserResponse", + "UserSelectComponentForMessageRequest", + "UserSelectComponentResponse", + "UserSelectDefaultValue", + "UserSelectDefaultValueResponse", + "VanityURLErrorResponse", + "VanityURLResponse", + "VoiceRegionResponse", + "VoiceScheduledEventCreateRequest", + "VoiceScheduledEventPatchRequestPartial", + "VoiceScheduledEventResponse", + "VoiceStateResponse", + "WebhookSlackEmbed", + "WebhookSlackEmbedField", + "WebhookSourceChannelResponse", + "WebhookSourceGuildResponse", + "WelcomeMessageResponse", + "WelcomeScreenPatchRequestPartial", + "WidgetActivity", + "WidgetChannel", + "WidgetMember", + "WidgetResponse", + "WidgetSettingsResponse", +] + +# import apis into sdk package +from dc_rest.api.default_api import DefaultApi as DefaultApi + +# import ApiClient +from dc_rest.api_response import ApiResponse as ApiResponse +from dc_rest.api_client import ApiClient as ApiClient +from dc_rest.configuration import Configuration as Configuration +from dc_rest.exceptions import OpenApiException as OpenApiException +from dc_rest.exceptions import ApiTypeError as ApiTypeError +from dc_rest.exceptions import ApiValueError as ApiValueError +from dc_rest.exceptions import ApiKeyError as ApiKeyError +from dc_rest.exceptions import ApiAttributeError as ApiAttributeError +from dc_rest.exceptions import ApiException as ApiException + +# import models into sdk package +from dc_rest.models.account_response import AccountResponse as AccountResponse +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest as ActionRowComponentForMessageRequest +from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner as ActionRowComponentForMessageRequestComponentsInner +from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest as ActionRowComponentForModalRequest +from dc_rest.models.action_row_component_response import ActionRowComponentResponse as ActionRowComponentResponse +from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner as ActionRowComponentResponseComponentsInner +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse as ActivitiesAttachmentResponse +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response as AddGroupDmUser201Response +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest as AddGroupDmUserRequest +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest as AddGuildMemberRequest +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest as AddLobbyMemberRequest +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption as ApplicationCommandAttachmentOption +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse as ApplicationCommandAttachmentOptionResponse +from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest as ApplicationCommandAutocompleteCallbackRequest +from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData as ApplicationCommandAutocompleteCallbackRequestData +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption as ApplicationCommandBooleanOption +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse as ApplicationCommandBooleanOptionResponse +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption as ApplicationCommandChannelOption +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse as ApplicationCommandChannelOptionResponse +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest as ApplicationCommandCreateRequest +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner as ApplicationCommandCreateRequestOptionsInner +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption as ApplicationCommandIntegerOption +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse as ApplicationCommandIntegerOptionResponse +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse as ApplicationCommandInteractionMetadataResponse +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption as ApplicationCommandMentionableOption +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse as ApplicationCommandMentionableOptionResponse +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption as ApplicationCommandNumberOption +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse as ApplicationCommandNumberOptionResponse +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice as ApplicationCommandOptionIntegerChoice +from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse as ApplicationCommandOptionIntegerChoiceResponse +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice as ApplicationCommandOptionNumberChoice +from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse as ApplicationCommandOptionNumberChoiceResponse +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice as ApplicationCommandOptionStringChoice +from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse as ApplicationCommandOptionStringChoiceResponse +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial as ApplicationCommandPatchRequestPartial +from dc_rest.models.application_command_permission import ApplicationCommandPermission as ApplicationCommandPermission +from dc_rest.models.application_command_response import ApplicationCommandResponse as ApplicationCommandResponse +from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner as ApplicationCommandResponseOptionsInner +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption as ApplicationCommandRoleOption +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse as ApplicationCommandRoleOptionResponse +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption as ApplicationCommandStringOption +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse as ApplicationCommandStringOptionResponse +from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption as ApplicationCommandSubcommandGroupOption +from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse as ApplicationCommandSubcommandGroupOptionResponse +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption as ApplicationCommandSubcommandOption +from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner as ApplicationCommandSubcommandOptionOptionsInner +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse as ApplicationCommandSubcommandOptionResponse +from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner as ApplicationCommandSubcommandOptionResponseOptionsInner +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest as ApplicationCommandUpdateRequest +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption as ApplicationCommandUserOption +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse as ApplicationCommandUserOptionResponse +from dc_rest.models.application_form_partial import ApplicationFormPartial as ApplicationFormPartial +from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription as ApplicationFormPartialDescription +from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue as ApplicationFormPartialIntegrationTypesConfigValue +from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse as ApplicationIncomingWebhookResponse +from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration as ApplicationIntegrationTypeConfiguration +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse as ApplicationIntegrationTypeConfigurationResponse +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams as ApplicationOAuth2InstallParams +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse as ApplicationOAuth2InstallParamsResponse +from dc_rest.models.application_response import ApplicationResponse as ApplicationResponse +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest as ApplicationRoleConnectionsMetadataItemRequest +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse as ApplicationRoleConnectionsMetadataItemResponse +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse as ApplicationUserRoleConnectionResponse +from dc_rest.models.attachment_response import AttachmentResponse as AttachmentResponse +from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse as AuditLogEntryResponse +from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse as AuditLogObjectChangeResponse +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest as BanUserFromGuildRequest +from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest as BaseCreateMessageCreateRequest +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner as BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.basic_application_response import BasicApplicationResponse as BasicApplicationResponse +from dc_rest.models.basic_message_response import BasicMessageResponse as BasicMessageResponse +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner as BasicMessageResponseComponentsInner +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata as BasicMessageResponseInteractionMetadata +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce as BasicMessageResponseNonce +from dc_rest.models.block_message_action import BlockMessageAction as BlockMessageAction +from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata as BlockMessageActionMetadata +from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse as BlockMessageActionMetadataResponse +from dc_rest.models.block_message_action_response import BlockMessageActionResponse as BlockMessageActionResponse +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest as BotAccountPatchRequest +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest as BulkBanUsersFromGuildRequest +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse as BulkBanUsersResponse +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest as BulkDeleteMessagesRequest +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest as BulkLobbyMemberRequest +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner as BulkUpdateGuildChannelsRequestInner +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner as BulkUpdateGuildRolesRequestInner +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest as ButtonComponentForMessageRequest +from dc_rest.models.button_component_response import ButtonComponentResponse as ButtonComponentResponse +from dc_rest.models.channel_follower_response import ChannelFollowerResponse as ChannelFollowerResponse +from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse as ChannelFollowerWebhookResponse +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest as ChannelPermissionOverwriteRequest +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse as ChannelPermissionOverwriteResponse +from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest as ChannelSelectComponentForMessageRequest +from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse as ChannelSelectComponentResponse +from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue as ChannelSelectDefaultValue +from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse as ChannelSelectDefaultValueResponse +from dc_rest.models.command_permission_response import CommandPermissionResponse as CommandPermissionResponse +from dc_rest.models.command_permissions_response import CommandPermissionsResponse as CommandPermissionsResponse +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest as ComponentEmojiForMessageRequest +from dc_rest.models.component_emoji_response import ComponentEmojiResponse as ComponentEmojiResponse +from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse as ConnectedAccountGuildResponse +from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse as ConnectedAccountIntegrationResponse +from dc_rest.models.connected_account_response import ConnectedAccountResponse as ConnectedAccountResponse +from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest as ContainerComponentForMessageRequest +from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner as ContainerComponentForMessageRequestComponentsInner +from dc_rest.models.container_component_response import ContainerComponentResponse as ContainerComponentResponse +from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner as ContainerComponentResponseComponentsInner +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest as CreateApplicationEmojiRequest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response as CreateAutoModerationRule200Response +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest as CreateAutoModerationRuleRequest +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest as CreateChannelInviteRequest +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData as CreateEntitlementRequestData +from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest as CreateForumThreadRequest +from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest as CreateGroupDMInviteRequest +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest as CreateGuildChannelRequest +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest as CreateGuildEmojiRequest +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest as CreateGuildFromTemplateRequest +from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest as CreateGuildInviteRequest +from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem as CreateGuildRequestChannelItem +from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem as CreateGuildRequestRoleItem +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest as CreateGuildRoleRequest +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest as CreateGuildScheduledEventRequest +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest as CreateGuildTemplateRequest +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest as CreateInteractionResponseRequest +from dc_rest.models.create_lobby_request import CreateLobbyRequest as CreateLobbyRequest +from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest as CreateMessageInteractionCallbackRequest +from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse as CreateMessageInteractionCallbackResponse +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest as CreateOrJoinLobbyRequest +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest as CreateOrUpdateThreadTagRequest +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest as CreatePrivateChannelRequest +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest as CreateStageInstanceRequest +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest as CreateTextThreadWithMessageRequest +from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest as CreateTextThreadWithoutMessageRequest +from dc_rest.models.create_thread_request import CreateThreadRequest as CreateThreadRequest +from dc_rest.models.create_webhook_request import CreateWebhookRequest as CreateWebhookRequest +from dc_rest.models.created_thread_response import CreatedThreadResponse as CreatedThreadResponse +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata as DefaultKeywordListTriggerMetadata +from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse as DefaultKeywordListTriggerMetadataResponse +from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest as DefaultKeywordListUpsertRequest +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner as DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial as DefaultKeywordListUpsertRequestPartial +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse as DefaultKeywordRuleResponse +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner as DefaultKeywordRuleResponseActionsInner +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse as DefaultReactionEmojiResponse +from dc_rest.models.discord_integration_response import DiscordIntegrationResponse as DiscordIntegrationResponse +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest as EditLobbyChannelLinkRequest +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance as EmbeddedActivityInstance +from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation as EmbeddedActivityInstanceLocation +from dc_rest.models.emoji_response import EmojiResponse as EmojiResponse +from dc_rest.models.entitlement_response import EntitlementResponse as EntitlementResponse +from dc_rest.models.entity_metadata_external import EntityMetadataExternal as EntityMetadataExternal +from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse as EntityMetadataExternalResponse +from dc_rest.models.error import Error as Error +from dc_rest.models.error_details import ErrorDetails as ErrorDetails +from dc_rest.models.error_response import ErrorResponse as ErrorResponse +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest as ExecuteWebhookRequest +from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse as ExternalConnectionIntegrationResponse +from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest as ExternalScheduledEventCreateRequest +from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial as ExternalScheduledEventPatchRequestPartial +from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse as ExternalScheduledEventResponse +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest as FileComponentForMessageRequest +from dc_rest.models.file_component_response import FileComponentResponse as FileComponentResponse +from dc_rest.models.flag_to_channel_action import FlagToChannelAction as FlagToChannelAction +from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata as FlagToChannelActionMetadata +from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse as FlagToChannelActionMetadataResponse +from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse as FlagToChannelActionResponse +from dc_rest.models.follow_channel_request import FollowChannelRequest as FollowChannelRequest +from dc_rest.models.forum_tag_response import ForumTagResponse as ForumTagResponse +from dc_rest.models.friend_invite_response import FriendInviteResponse as FriendInviteResponse +from dc_rest.models.gateway_bot_response import GatewayBotResponse as GatewayBotResponse +from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse as GatewayBotSessionStartLimitResponse +from dc_rest.models.gateway_response import GatewayResponse as GatewayResponse +from dc_rest.models.get_channel200_response import GetChannel200Response as GetChannel200Response +from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter as GetEntitlementsSkuIdsParameter +from dc_rest.models.get_sticker200_response import GetSticker200Response as GetSticker200Response +from dc_rest.models.github_author import GithubAuthor as GithubAuthor +from dc_rest.models.github_check_app import GithubCheckApp as GithubCheckApp +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest as GithubCheckPullRequest +from dc_rest.models.github_check_run import GithubCheckRun as GithubCheckRun +from dc_rest.models.github_check_run_output import GithubCheckRunOutput as GithubCheckRunOutput +from dc_rest.models.github_check_suite import GithubCheckSuite as GithubCheckSuite +from dc_rest.models.github_comment import GithubComment as GithubComment +from dc_rest.models.github_commit import GithubCommit as GithubCommit +from dc_rest.models.github_discussion import GithubDiscussion as GithubDiscussion +from dc_rest.models.github_issue import GithubIssue as GithubIssue +from dc_rest.models.github_release import GithubRelease as GithubRelease +from dc_rest.models.github_repository import GithubRepository as GithubRepository +from dc_rest.models.github_review import GithubReview as GithubReview +from dc_rest.models.github_user import GithubUser as GithubUser +from dc_rest.models.github_webhook import GithubWebhook as GithubWebhook +from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse as GroupDMInviteResponse +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse as GuildAuditLogResponse +from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner as GuildAuditLogResponseIntegrationsInner +from dc_rest.models.guild_ban_response import GuildBanResponse as GuildBanResponse +from dc_rest.models.guild_channel_location import GuildChannelLocation as GuildChannelLocation +from dc_rest.models.guild_channel_response import GuildChannelResponse as GuildChannelResponse +from dc_rest.models.guild_create_request import GuildCreateRequest as GuildCreateRequest +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse as GuildHomeSettingsResponse +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse as GuildIncomingWebhookResponse +from dc_rest.models.guild_invite_response import GuildInviteResponse as GuildInviteResponse +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse as GuildMFALevelResponse +from dc_rest.models.guild_member_response import GuildMemberResponse as GuildMemberResponse +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse as GuildOnboardingResponse +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial as GuildPatchRequestPartial +from dc_rest.models.guild_preview_response import GuildPreviewResponse as GuildPreviewResponse +from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse as GuildProductPurchaseResponse +from dc_rest.models.guild_prune_response import GuildPruneResponse as GuildPruneResponse +from dc_rest.models.guild_response import GuildResponse as GuildResponse +from dc_rest.models.guild_role_response import GuildRoleResponse as GuildRoleResponse +from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse as GuildRoleTagsResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse as GuildStickerResponse +from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse as GuildSubscriptionIntegrationResponse +from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse as GuildTemplateChannelResponse +from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags as GuildTemplateChannelTags +from dc_rest.models.guild_template_response import GuildTemplateResponse as GuildTemplateResponse +from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse as GuildTemplateRoleResponse +from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse as GuildTemplateSnapshotResponse +from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel as GuildWelcomeChannel +from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse as GuildWelcomeScreenChannelResponse +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse as GuildWelcomeScreenResponse +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse as GuildWithCountsResponse +from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest as IncomingWebhookInteractionRequest +from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial as IncomingWebhookRequestPartial +from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial as IncomingWebhookUpdateForInteractionCallbackRequestPartial +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial as IncomingWebhookUpdateRequestPartial +from dc_rest.models.inner_errors import InnerErrors as InnerErrors +from dc_rest.models.integration_application_response import IntegrationApplicationResponse as IntegrationApplicationResponse +from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData as InteractionApplicationCommandAutocompleteCallbackIntegerData +from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData as InteractionApplicationCommandAutocompleteCallbackNumberData +from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData as InteractionApplicationCommandAutocompleteCallbackStringData +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse as InteractionCallbackResponse +from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource as InteractionCallbackResponseResource +from dc_rest.models.interaction_response import InteractionResponse as InteractionResponse +from dc_rest.models.invite_application_response import InviteApplicationResponse as InviteApplicationResponse +from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse as InviteChannelRecipientResponse +from dc_rest.models.invite_channel_response import InviteChannelResponse as InviteChannelResponse +from dc_rest.models.invite_guild_response import InviteGuildResponse as InviteGuildResponse +from dc_rest.models.keyword_rule_response import KeywordRuleResponse as KeywordRuleResponse +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata as KeywordTriggerMetadata +from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse as KeywordTriggerMetadataResponse +from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest as KeywordUpsertRequest +from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial as KeywordUpsertRequestPartial +from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest as LaunchActivityInteractionCallbackRequest +from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse as LaunchActivityInteractionCallbackResponse +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse as ListApplicationEmojisResponse +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner as ListAutoModerationRules200ResponseInner +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner as ListChannelInvites200ResponseInner +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner as ListChannelWebhooks200ResponseInner +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner as ListGuildIntegrations200ResponseInner +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner as ListGuildScheduledEvents200ResponseInner +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse as ListGuildSoundboardSoundsResponse +from dc_rest.models.lobby_member_request import LobbyMemberRequest as LobbyMemberRequest +from dc_rest.models.lobby_member_response import LobbyMemberResponse as LobbyMemberResponse +from dc_rest.models.lobby_message_response import LobbyMessageResponse as LobbyMessageResponse +from dc_rest.models.lobby_response import LobbyResponse as LobbyResponse +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse as MLSpamRuleResponse +from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest as MLSpamUpsertRequest +from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial as MLSpamUpsertRequestPartial +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest as MediaGalleryComponentForMessageRequest +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse as MediaGalleryComponentResponse +from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest as MediaGalleryItemRequest +from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse as MediaGalleryItemResponse +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse as MentionSpamRuleResponse +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata as MentionSpamTriggerMetadata +from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse as MentionSpamTriggerMetadataResponse +from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest as MentionSpamUpsertRequest +from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial as MentionSpamUpsertRequestPartial +from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest as MentionableSelectComponentForMessageRequest +from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner as MentionableSelectComponentForMessageRequestDefaultValuesInner +from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse as MentionableSelectComponentResponse +from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner as MentionableSelectComponentResponseDefaultValuesInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest as MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest as MessageAttachmentRequest +from dc_rest.models.message_attachment_response import MessageAttachmentResponse as MessageAttachmentResponse +from dc_rest.models.message_call_response import MessageCallResponse as MessageCallResponse +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse as MessageComponentInteractionMetadataResponse +from dc_rest.models.message_create_request import MessageCreateRequest as MessageCreateRequest +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial as MessageEditRequestPartial +from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse as MessageEmbedAuthorResponse +from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse as MessageEmbedFieldResponse +from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse as MessageEmbedFooterResponse +from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse as MessageEmbedImageResponse +from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse as MessageEmbedProviderResponse +from dc_rest.models.message_embed_response import MessageEmbedResponse as MessageEmbedResponse +from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse as MessageEmbedVideoResponse +from dc_rest.models.message_interaction_response import MessageInteractionResponse as MessageInteractionResponse +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse as MessageMentionChannelResponse +from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse as MessageReactionCountDetailsResponse +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse as MessageReactionEmojiResponse +from dc_rest.models.message_reaction_response import MessageReactionResponse as MessageReactionResponse +from dc_rest.models.message_reference_request import MessageReferenceRequest as MessageReferenceRequest +from dc_rest.models.message_reference_response import MessageReferenceResponse as MessageReferenceResponse +from dc_rest.models.message_response import MessageResponse as MessageResponse +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse as MessageRoleSubscriptionDataResponse +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse as MessageSnapshotResponse +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse as MessageStickerItemResponse +from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse as MinimalContentMessageResponse +from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest as ModalInteractionCallbackRequest +from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData as ModalInteractionCallbackRequestData +from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse as ModalSubmitInteractionMetadataResponse +from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata as ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata +from dc_rest.models.my_guild_response import MyGuildResponse as MyGuildResponse +from dc_rest.models.new_member_action_response import NewMemberActionResponse as NewMemberActionResponse +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse as OAuth2GetAuthorizationResponse +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys as OAuth2GetKeys +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse as OAuth2GetOpenIDConnectUserInfoResponse +from dc_rest.models.o_auth2_key import OAuth2Key as OAuth2Key +from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest as OnboardingPromptOptionRequest +from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse as OnboardingPromptOptionResponse +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse as OnboardingPromptResponse +from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse as PartialDiscordIntegrationResponse +from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse as PartialExternalConnectionIntegrationResponse +from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse as PartialGuildSubscriptionIntegrationResponse +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest as PartnerSdkUnmergeProvisionalAccountRequest +from dc_rest.models.pinned_message_response import PinnedMessageResponse as PinnedMessageResponse +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse as PinnedMessagesResponse +from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest as PollAnswerCreateRequest +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse as PollAnswerDetailsResponse +from dc_rest.models.poll_answer_response import PollAnswerResponse as PollAnswerResponse +from dc_rest.models.poll_create_request import PollCreateRequest as PollCreateRequest +from dc_rest.models.poll_emoji import PollEmoji as PollEmoji +from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest as PollEmojiCreateRequest +from dc_rest.models.poll_media import PollMedia as PollMedia +from dc_rest.models.poll_media_create_request import PollMediaCreateRequest as PollMediaCreateRequest +from dc_rest.models.poll_media_response import PollMediaResponse as PollMediaResponse +from dc_rest.models.poll_response import PollResponse as PollResponse +from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse as PollResultsEntryResponse +from dc_rest.models.poll_results_response import PollResultsResponse as PollResultsResponse +from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest as PongInteractionCallbackRequest +from dc_rest.models.private_application_response import PrivateApplicationResponse as PrivateApplicationResponse +from dc_rest.models.private_channel_location import PrivateChannelLocation as PrivateChannelLocation +from dc_rest.models.private_channel_response import PrivateChannelResponse as PrivateChannelResponse +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse as PrivateGroupChannelResponse +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse as PrivateGuildMemberResponse +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse as ProvisionalTokenResponse +from dc_rest.models.prune_guild_request import PruneGuildRequest as PruneGuildRequest +from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles as PruneGuildRequestIncludeRoles +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse as PurchaseNotificationResponse +from dc_rest.models.quarantine_user_action import QuarantineUserAction as QuarantineUserAction +from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse as QuarantineUserActionResponse +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse as ResolvedObjectsResponse +from dc_rest.models.resource_channel_response import ResourceChannelResponse as ResourceChannelResponse +from dc_rest.models.rich_embed import RichEmbed as RichEmbed +from dc_rest.models.rich_embed_author import RichEmbedAuthor as RichEmbedAuthor +from dc_rest.models.rich_embed_field import RichEmbedField as RichEmbedField +from dc_rest.models.rich_embed_footer import RichEmbedFooter as RichEmbedFooter +from dc_rest.models.rich_embed_image import RichEmbedImage as RichEmbedImage +from dc_rest.models.rich_embed_provider import RichEmbedProvider as RichEmbedProvider +from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail as RichEmbedThumbnail +from dc_rest.models.rich_embed_video import RichEmbedVideo as RichEmbedVideo +from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest as RoleSelectComponentForMessageRequest +from dc_rest.models.role_select_component_response import RoleSelectComponentResponse as RoleSelectComponentResponse +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue as RoleSelectDefaultValue +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse as RoleSelectDefaultValueResponse +from dc_rest.models.sdk_message_request import SDKMessageRequest as SDKMessageRequest +from dc_rest.models.scheduled_event_response import ScheduledEventResponse as ScheduledEventResponse +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse as ScheduledEventUserResponse +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest as SectionComponentForMessageRequest +from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory as SectionComponentForMessageRequestAccessory +from dc_rest.models.section_component_response import SectionComponentResponse as SectionComponentResponse +from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory as SectionComponentResponseAccessory +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest as SeparatorComponentForMessageRequest +from dc_rest.models.separator_component_response import SeparatorComponentResponse as SeparatorComponentResponse +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest as SetChannelPermissionOverwriteRequest +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest as SetGuildApplicationCommandPermissionsRequest +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest as SetGuildMfaLevelRequest +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse as SettingsEmojiResponse +from dc_rest.models.slack_webhook import SlackWebhook as SlackWebhook +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest as SoundboardCreateRequest +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial as SoundboardPatchRequestPartial +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse as SoundboardSoundResponse +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest as SoundboardSoundSendRequest +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse as SpamLinkRuleResponse +from dc_rest.models.stage_instance_response import StageInstanceResponse as StageInstanceResponse +from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest as StageScheduledEventCreateRequest +from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial as StageScheduledEventPatchRequestPartial +from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse as StageScheduledEventResponse +from dc_rest.models.standard_sticker_response import StandardStickerResponse as StandardStickerResponse +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse as StickerPackCollectionResponse +from dc_rest.models.sticker_pack_response import StickerPackResponse as StickerPackResponse +from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest as StringSelectComponentForMessageRequest +from dc_rest.models.string_select_component_response import StringSelectComponentResponse as StringSelectComponentResponse +from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest as StringSelectOptionForMessageRequest +from dc_rest.models.string_select_option_response import StringSelectOptionResponse as StringSelectOptionResponse +from dc_rest.models.team_member_response import TeamMemberResponse as TeamMemberResponse +from dc_rest.models.team_response import TeamResponse as TeamResponse +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest as TextDisplayComponentForMessageRequest +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse as TextDisplayComponentResponse +from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest as TextInputComponentForModalRequest +from dc_rest.models.text_input_component_response import TextInputComponentResponse as TextInputComponentResponse +from dc_rest.models.thread_member_response import ThreadMemberResponse as ThreadMemberResponse +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse as ThreadMetadataResponse +from dc_rest.models.thread_response import ThreadResponse as ThreadResponse +from dc_rest.models.thread_search_response import ThreadSearchResponse as ThreadSearchResponse +from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter as ThreadSearchTagParameter +from dc_rest.models.threads_response import ThreadsResponse as ThreadsResponse +from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest as ThumbnailComponentForMessageRequest +from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse as ThumbnailComponentResponse +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest as UnfurledMediaRequest +from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired as UnfurledMediaRequestWithAttachmentReferenceRequired +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse as UnfurledMediaResponse +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest as UpdateApplicationEmojiRequest +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest as UpdateApplicationUserRoleConnectionRequest +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest as UpdateAutoModerationRuleRequest +from dc_rest.models.update_channel_request import UpdateChannelRequest as UpdateChannelRequest +from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial as UpdateDMRequestPartial +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest as UpdateDefaultReactionEmojiRequest +from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial as UpdateGroupDMRequestPartial +from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial as UpdateGuildChannelRequestPartial +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest as UpdateGuildEmojiRequest +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest as UpdateGuildMemberRequest +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest as UpdateGuildOnboardingRequest +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest as UpdateGuildScheduledEventRequest +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest as UpdateGuildStickerRequest +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest as UpdateGuildTemplateRequest +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest as UpdateGuildWidgetSettingsRequest +from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest as UpdateMessageInteractionCallbackRequest +from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse as UpdateMessageInteractionCallbackResponse +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest as UpdateMyGuildMemberRequest +from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest as UpdateOnboardingPromptRequest +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest as UpdateSelfVoiceStateRequest +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest as UpdateStageInstanceRequest +from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial as UpdateThreadRequestPartial +from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest as UpdateThreadTagRequest +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest as UpdateVoiceStateRequest +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest as UpdateWebhookByTokenRequest +from dc_rest.models.update_webhook_request import UpdateWebhookRequest as UpdateWebhookRequest +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse as UserAvatarDecorationResponse +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse as UserCollectiblesResponse +from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction as UserCommunicationDisabledAction +from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata as UserCommunicationDisabledActionMetadata +from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse as UserCommunicationDisabledActionMetadataResponse +from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse as UserCommunicationDisabledActionResponse +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse as UserGuildOnboardingResponse +from dc_rest.models.user_nameplate_response import UserNameplateResponse as UserNameplateResponse +from dc_rest.models.user_pii_response import UserPIIResponse as UserPIIResponse +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse as UserPrimaryGuildResponse +from dc_rest.models.user_response import UserResponse as UserResponse +from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest as UserSelectComponentForMessageRequest +from dc_rest.models.user_select_component_response import UserSelectComponentResponse as UserSelectComponentResponse +from dc_rest.models.user_select_default_value import UserSelectDefaultValue as UserSelectDefaultValue +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse as UserSelectDefaultValueResponse +from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse as VanityURLErrorResponse +from dc_rest.models.vanity_url_response import VanityURLResponse as VanityURLResponse +from dc_rest.models.voice_region_response import VoiceRegionResponse as VoiceRegionResponse +from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest as VoiceScheduledEventCreateRequest +from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial as VoiceScheduledEventPatchRequestPartial +from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse as VoiceScheduledEventResponse +from dc_rest.models.voice_state_response import VoiceStateResponse as VoiceStateResponse +from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed as WebhookSlackEmbed +from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField as WebhookSlackEmbedField +from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse as WebhookSourceChannelResponse +from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse as WebhookSourceGuildResponse +from dc_rest.models.welcome_message_response import WelcomeMessageResponse as WelcomeMessageResponse +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial as WelcomeScreenPatchRequestPartial +from dc_rest.models.widget_activity import WidgetActivity as WidgetActivity +from dc_rest.models.widget_channel import WidgetChannel as WidgetChannel +from dc_rest.models.widget_member import WidgetMember as WidgetMember +from dc_rest.models.widget_response import WidgetResponse as WidgetResponse +from dc_rest.models.widget_settings_response import WidgetSettingsResponse as WidgetSettingsResponse diff --git a/dc_rest/api/__init__.py b/dc_rest/api/__init__.py new file mode 100644 index 0000000..5c51c5e --- /dev/null +++ b/dc_rest/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from dc_rest.api.default_api import DefaultApi + diff --git a/dc_rest/api/default_api.py b/dc_rest/api/default_api.py new file mode 100644 index 0000000..e075cdc --- /dev/null +++ b/dc_rest/api/default_api.py @@ -0,0 +1,63438 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest +from dc_rest.models.application_form_partial import ApplicationFormPartial +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner +from dc_rest.models.channel_follower_response import ChannelFollowerResponse +from dc_rest.models.command_permissions_response import CommandPermissionsResponse +from dc_rest.models.connected_account_response import ConnectedAccountResponse +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest +from dc_rest.models.create_lobby_request import CreateLobbyRequest +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest +from dc_rest.models.create_thread_request import CreateThreadRequest +from dc_rest.models.create_webhook_request import CreateWebhookRequest +from dc_rest.models.created_thread_response import CreatedThreadResponse +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.entitlement_response import EntitlementResponse +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest +from dc_rest.models.follow_channel_request import FollowChannelRequest +from dc_rest.models.gateway_bot_response import GatewayBotResponse +from dc_rest.models.gateway_response import GatewayResponse +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.models.github_webhook import GithubWebhook +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse +from dc_rest.models.guild_ban_response import GuildBanResponse +from dc_rest.models.guild_channel_response import GuildChannelResponse +from dc_rest.models.guild_create_request import GuildCreateRequest +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial +from dc_rest.models.guild_preview_response import GuildPreviewResponse +from dc_rest.models.guild_prune_response import GuildPruneResponse +from dc_rest.models.guild_response import GuildResponse +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse +from dc_rest.models.lobby_member_response import LobbyMemberResponse +from dc_rest.models.lobby_message_response import LobbyMessageResponse +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.models.message_create_request import MessageCreateRequest +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial +from dc_rest.models.message_response import MessageResponse +from dc_rest.models.my_guild_response import MyGuildResponse +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse +from dc_rest.models.prune_guild_request import PruneGuildRequest +from dc_rest.models.sdk_message_request import SDKMessageRequest +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest +from dc_rest.models.slack_webhook import SlackWebhook +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest +from dc_rest.models.stage_instance_response import StageInstanceResponse +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse +from dc_rest.models.sticker_pack_response import StickerPackResponse +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.models.thread_search_response import ThreadSearchResponse +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest +from dc_rest.models.update_channel_request import UpdateChannelRequest +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest +from dc_rest.models.update_webhook_request import UpdateWebhookRequest +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse +from dc_rest.models.user_pii_response import UserPIIResponse +from dc_rest.models.user_response import UserResponse +from dc_rest.models.vanity_url_response import VanityURLResponse +from dc_rest.models.voice_region_response import VoiceRegionResponse +from dc_rest.models.voice_state_response import VoiceStateResponse +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial +from dc_rest.models.widget_response import WidgetResponse +from dc_rest.models.widget_settings_response import WidgetSettingsResponse + +from dc_rest.api_client import ApiClient, RequestSerialized +from dc_rest.api_response import ApiResponse +from dc_rest.rest import RESTResponseType + + +class DefaultApi: + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def add_group_dm_user( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_group_dm_user_request: AddGroupDmUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddGroupDmUser201Response: + """add_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param add_group_dm_user_request: (required) + :type add_group_dm_user_request: AddGroupDmUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + add_group_dm_user_request=add_group_dm_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AddGroupDmUser201Response", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_group_dm_user_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_group_dm_user_request: AddGroupDmUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddGroupDmUser201Response]: + """add_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param add_group_dm_user_request: (required) + :type add_group_dm_user_request: AddGroupDmUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + add_group_dm_user_request=add_group_dm_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AddGroupDmUser201Response", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_group_dm_user_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_group_dm_user_request: AddGroupDmUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param add_group_dm_user_request: (required) + :type add_group_dm_user_request: AddGroupDmUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + add_group_dm_user_request=add_group_dm_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AddGroupDmUser201Response", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_group_dm_user_serialize( + self, + channel_id, + user_id, + add_group_dm_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_group_dm_user_request is not None: + _body_params = add_group_dm_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/recipients/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_guild_member_request: AddGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildMemberResponse: + """add_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param add_guild_member_request: (required) + :type add_guild_member_request: AddGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + add_guild_member_request=add_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_guild_member_request: AddGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildMemberResponse]: + """add_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param add_guild_member_request: (required) + :type add_guild_member_request: AddGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + add_guild_member_request=add_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_guild_member_request: AddGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param add_guild_member_request: (required) + :type add_guild_member_request: AddGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + add_guild_member_request=add_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_guild_member_serialize( + self, + guild_id, + user_id, + add_guild_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_guild_member_request is not None: + _body_params = add_guild_member_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/guilds/{guild_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_guild_member_role( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """add_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_guild_member_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """add_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_guild_member_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_guild_member_role_serialize( + self, + guild_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + if role_id is not None: + _path_params['role_id'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/guilds/{guild_id}/members/{user_id}/roles/{role_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_lobby_member( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_lobby_member_request: AddLobbyMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyMemberResponse: + """add_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param add_lobby_member_request: (required) + :type add_lobby_member_request: AddLobbyMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + add_lobby_member_request=add_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_lobby_member_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_lobby_member_request: AddLobbyMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyMemberResponse]: + """add_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param add_lobby_member_request: (required) + :type add_lobby_member_request: AddLobbyMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + add_lobby_member_request=add_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_lobby_member_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + add_lobby_member_request: AddLobbyMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param add_lobby_member_request: (required) + :type add_lobby_member_request: AddLobbyMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + add_lobby_member_request=add_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_lobby_member_serialize( + self, + lobby_id, + user_id, + add_lobby_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_lobby_member_request is not None: + _body_params = add_lobby_member_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/lobbies/{lobby_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_my_message_reaction( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """add_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_my_message_reaction_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """add_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_my_message_reaction_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_my_message_reaction_serialize( + self, + channel_id, + message_id, + emoji_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if emoji_name is not None: + _path_params['emoji_name'] = emoji_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_thread_member( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """add_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_thread_member_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """add_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_thread_member_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_thread_member_serialize( + self, + channel_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/thread-members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def applications_get_activity_instance( + self, + application_id: Annotated[str, Field(strict=True)], + instance_id: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmbeddedActivityInstance: + """applications_get_activity_instance + + + :param application_id: (required) + :type application_id: str + :param instance_id: (required) + :type instance_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._applications_get_activity_instance_serialize( + application_id=application_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedActivityInstance", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def applications_get_activity_instance_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + instance_id: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmbeddedActivityInstance]: + """applications_get_activity_instance + + + :param application_id: (required) + :type application_id: str + :param instance_id: (required) + :type instance_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._applications_get_activity_instance_serialize( + application_id=application_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedActivityInstance", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def applications_get_activity_instance_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + instance_id: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """applications_get_activity_instance + + + :param application_id: (required) + :type application_id: str + :param instance_id: (required) + :type instance_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._applications_get_activity_instance_serialize( + application_id=application_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddedActivityInstance", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _applications_get_activity_instance_serialize( + self, + application_id, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if instance_id is not None: + _path_params['instance_id'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/activity-instances/{instance_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def ban_user_from_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + ban_user_from_guild_request: BanUserFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """ban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param ban_user_from_guild_request: (required) + :type ban_user_from_guild_request: BanUserFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._ban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + ban_user_from_guild_request=ban_user_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def ban_user_from_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + ban_user_from_guild_request: BanUserFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """ban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param ban_user_from_guild_request: (required) + :type ban_user_from_guild_request: BanUserFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._ban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + ban_user_from_guild_request=ban_user_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def ban_user_from_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + ban_user_from_guild_request: BanUserFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """ban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param ban_user_from_guild_request: (required) + :type ban_user_from_guild_request: BanUserFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._ban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + ban_user_from_guild_request=ban_user_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _ban_user_from_guild_serialize( + self, + guild_id, + user_id, + ban_user_from_guild_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if ban_user_from_guild_request is not None: + _body_params = ban_user_from_guild_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/guilds/{guild_id}/bans/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_ban_users_from_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BulkBanUsersResponse: + """bulk_ban_users_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param bulk_ban_users_from_guild_request: (required) + :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_ban_users_from_guild_serialize( + guild_id=guild_id, + bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkBanUsersResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_ban_users_from_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkBanUsersResponse]: + """bulk_ban_users_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param bulk_ban_users_from_guild_request: (required) + :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_ban_users_from_guild_serialize( + guild_id=guild_id, + bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkBanUsersResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_ban_users_from_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_ban_users_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param bulk_ban_users_from_guild_request: (required) + :type bulk_ban_users_from_guild_request: BulkBanUsersFromGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_ban_users_from_guild_serialize( + guild_id=guild_id, + bulk_ban_users_from_guild_request=bulk_ban_users_from_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkBanUsersResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_ban_users_from_guild_serialize( + self, + guild_id, + bulk_ban_users_from_guild_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_ban_users_from_guild_request is not None: + _body_params = bulk_ban_users_from_guild_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/bulk-ban', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_delete_messages( + self, + channel_id: Annotated[str, Field(strict=True)], + bulk_delete_messages_request: BulkDeleteMessagesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """bulk_delete_messages + + + :param channel_id: (required) + :type channel_id: str + :param bulk_delete_messages_request: (required) + :type bulk_delete_messages_request: BulkDeleteMessagesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_messages_serialize( + channel_id=channel_id, + bulk_delete_messages_request=bulk_delete_messages_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_delete_messages_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + bulk_delete_messages_request: BulkDeleteMessagesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """bulk_delete_messages + + + :param channel_id: (required) + :type channel_id: str + :param bulk_delete_messages_request: (required) + :type bulk_delete_messages_request: BulkDeleteMessagesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_messages_serialize( + channel_id=channel_id, + bulk_delete_messages_request=bulk_delete_messages_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_delete_messages_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + bulk_delete_messages_request: BulkDeleteMessagesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_delete_messages + + + :param channel_id: (required) + :type channel_id: str + :param bulk_delete_messages_request: (required) + :type bulk_delete_messages_request: BulkDeleteMessagesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_messages_serialize( + channel_id=channel_id, + bulk_delete_messages_request=bulk_delete_messages_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_delete_messages_serialize( + self, + channel_id, + bulk_delete_messages_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_delete_messages_request is not None: + _body_params = bulk_delete_messages_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/messages/bulk-delete', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_set_application_commands( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationCommandResponse]: + """bulk_set_application_commands + + + :param application_id: (required) + :type application_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_application_commands_serialize( + application_id=application_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_set_application_commands_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationCommandResponse]]: + """bulk_set_application_commands + + + :param application_id: (required) + :type application_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_application_commands_serialize( + application_id=application_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_set_application_commands_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_set_application_commands + + + :param application_id: (required) + :type application_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_application_commands_serialize( + application_id=application_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_set_application_commands_serialize( + self, + application_id, + application_command_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'ApplicationCommandUpdateRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_update_request is not None: + _body_params = application_command_update_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/applications/{application_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_set_guild_application_commands( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationCommandResponse]: + """bulk_set_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_set_guild_application_commands_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationCommandResponse]]: + """bulk_set_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_set_guild_application_commands_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_update_request: Optional[Annotated[List[ApplicationCommandUpdateRequest], Field(max_length=110)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_set_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_update_request: (required) + :type application_command_update_request: List[ApplicationCommandUpdateRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_set_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_update_request=application_command_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_set_guild_application_commands_serialize( + self, + application_id, + guild_id, + application_command_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'ApplicationCommandUpdateRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_update_request is not None: + _body_params = application_command_update_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_update_guild_channels( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """bulk_update_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_channels_request_inner: (required) + :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_channels_serialize( + guild_id=guild_id, + bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_update_guild_channels_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """bulk_update_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_channels_request_inner: (required) + :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_channels_serialize( + guild_id=guild_id, + bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_update_guild_channels_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_update_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_channels_request_inner: (required) + :type bulk_update_guild_channels_request_inner: List[BulkUpdateGuildChannelsRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_channels_serialize( + guild_id=guild_id, + bulk_update_guild_channels_request_inner=bulk_update_guild_channels_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_update_guild_channels_serialize( + self, + guild_id, + bulk_update_guild_channels_request_inner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'BulkUpdateGuildChannelsRequestInner': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_update_guild_channels_request_inner is not None: + _body_params = bulk_update_guild_channels_request_inner + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/channels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_update_guild_roles( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildRoleResponse]: + """bulk_update_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_roles_request_inner: (required) + :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_roles_serialize( + guild_id=guild_id, + bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_update_guild_roles_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildRoleResponse]]: + """bulk_update_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_roles_request_inner: (required) + :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_roles_serialize( + guild_id=guild_id, + bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_update_guild_roles_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_update_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param bulk_update_guild_roles_request_inner: (required) + :type bulk_update_guild_roles_request_inner: List[BulkUpdateGuildRolesRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_guild_roles_serialize( + guild_id=guild_id, + bulk_update_guild_roles_request_inner=bulk_update_guild_roles_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_update_guild_roles_serialize( + self, + guild_id, + bulk_update_guild_roles_request_inner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'BulkUpdateGuildRolesRequestInner': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_update_guild_roles_request_inner is not None: + _body_params = bulk_update_guild_roles_request_inner + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/roles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def bulk_update_lobby_members( + self, + lobby_id: Annotated[str, Field(strict=True)], + bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LobbyMemberResponse]: + """bulk_update_lobby_members + + + :param lobby_id: (required) + :type lobby_id: str + :param bulk_lobby_member_request: (required) + :type bulk_lobby_member_request: List[BulkLobbyMemberRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_lobby_members_serialize( + lobby_id=lobby_id, + bulk_lobby_member_request=bulk_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def bulk_update_lobby_members_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LobbyMemberResponse]]: + """bulk_update_lobby_members + + + :param lobby_id: (required) + :type lobby_id: str + :param bulk_lobby_member_request: (required) + :type bulk_lobby_member_request: List[BulkLobbyMemberRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_lobby_members_serialize( + lobby_id=lobby_id, + bulk_lobby_member_request=bulk_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def bulk_update_lobby_members_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + bulk_lobby_member_request: Optional[Annotated[List[BulkLobbyMemberRequest], Field(min_length=1, max_length=25)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """bulk_update_lobby_members + + + :param lobby_id: (required) + :type lobby_id: str + :param bulk_lobby_member_request: (required) + :type bulk_lobby_member_request: List[BulkLobbyMemberRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_update_lobby_members_serialize( + lobby_id=lobby_id, + bulk_lobby_member_request=bulk_lobby_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_update_lobby_members_serialize( + self, + lobby_id, + bulk_lobby_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'BulkLobbyMemberRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_lobby_member_request is not None: + _body_params = bulk_lobby_member_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/lobbies/{lobby_id}/members/bulk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def consume_entitlement( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """consume_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._consume_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def consume_entitlement_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """consume_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._consume_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def consume_entitlement_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """consume_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._consume_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _consume_entitlement_serialize( + self, + application_id, + entitlement_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if entitlement_id is not None: + _path_params['entitlement_id'] = entitlement_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/entitlements/{entitlement_id}/consume', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """create_application_command + + + :param application_id: (required) + :type application_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_command_serialize( + application_id=application_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """create_application_command + + + :param application_id: (required) + :type application_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_command_serialize( + application_id=application_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_application_command + + + :param application_id: (required) + :type application_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_command_serialize( + application_id=application_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_application_command_serialize( + self, + application_id, + application_command_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_create_request is not None: + _body_params = application_command_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_application_emoji( + self, + application_id: Annotated[str, Field(strict=True)], + create_application_emoji_request: CreateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """create_application_emoji + + + :param application_id: (required) + :type application_id: str + :param create_application_emoji_request: (required) + :type create_application_emoji_request: CreateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_emoji_serialize( + application_id=application_id, + create_application_emoji_request=create_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_application_emoji_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + create_application_emoji_request: CreateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """create_application_emoji + + + :param application_id: (required) + :type application_id: str + :param create_application_emoji_request: (required) + :type create_application_emoji_request: CreateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_emoji_serialize( + application_id=application_id, + create_application_emoji_request=create_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_application_emoji_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + create_application_emoji_request: CreateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_application_emoji + + + :param application_id: (required) + :type application_id: str + :param create_application_emoji_request: (required) + :type create_application_emoji_request: CreateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_emoji_serialize( + application_id=application_id, + create_application_emoji_request=create_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_application_emoji_serialize( + self, + application_id, + create_application_emoji_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_application_emoji_request is not None: + _body_params = create_application_emoji_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/emojis', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_auto_moderation_rule( + self, + guild_id: Annotated[str, Field(strict=True)], + create_auto_moderation_rule_request: CreateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateAutoModerationRule200Response: + """create_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param create_auto_moderation_rule_request: (required) + :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auto_moderation_rule_serialize( + guild_id=guild_id, + create_auto_moderation_rule_request=create_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_auto_moderation_rule_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_auto_moderation_rule_request: CreateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateAutoModerationRule200Response]: + """create_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param create_auto_moderation_rule_request: (required) + :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auto_moderation_rule_serialize( + guild_id=guild_id, + create_auto_moderation_rule_request=create_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_auto_moderation_rule_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_auto_moderation_rule_request: CreateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param create_auto_moderation_rule_request: (required) + :type create_auto_moderation_rule_request: CreateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auto_moderation_rule_serialize( + guild_id=guild_id, + create_auto_moderation_rule_request=create_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_auto_moderation_rule_serialize( + self, + guild_id, + create_auto_moderation_rule_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_auto_moderation_rule_request is not None: + _body_params = create_auto_moderation_rule_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/auto-moderation/rules', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_channel_invite( + self, + channel_id: Annotated[str, Field(strict=True)], + create_channel_invite_request: CreateChannelInviteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelInvites200ResponseInner: + """create_channel_invite + + + :param channel_id: (required) + :type channel_id: str + :param create_channel_invite_request: (required) + :type create_channel_invite_request: CreateChannelInviteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_channel_invite_serialize( + channel_id=channel_id, + create_channel_invite_request=create_channel_invite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_channel_invite_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + create_channel_invite_request: CreateChannelInviteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelInvites200ResponseInner]: + """create_channel_invite + + + :param channel_id: (required) + :type channel_id: str + :param create_channel_invite_request: (required) + :type create_channel_invite_request: CreateChannelInviteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_channel_invite_serialize( + channel_id=channel_id, + create_channel_invite_request=create_channel_invite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_channel_invite_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + create_channel_invite_request: CreateChannelInviteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_channel_invite + + + :param channel_id: (required) + :type channel_id: str + :param create_channel_invite_request: (required) + :type create_channel_invite_request: CreateChannelInviteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_channel_invite_serialize( + channel_id=channel_id, + create_channel_invite_request=create_channel_invite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_channel_invite_serialize( + self, + channel_id, + create_channel_invite_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_channel_invite_request is not None: + _body_params = create_channel_invite_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_dm( + self, + create_private_channel_request: CreatePrivateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddGroupDmUser201Response: + """create_dm + + + :param create_private_channel_request: (required) + :type create_private_channel_request: CreatePrivateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dm_serialize( + create_private_channel_request=create_private_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupDmUser201Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_dm_with_http_info( + self, + create_private_channel_request: CreatePrivateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddGroupDmUser201Response]: + """create_dm + + + :param create_private_channel_request: (required) + :type create_private_channel_request: CreatePrivateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dm_serialize( + create_private_channel_request=create_private_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupDmUser201Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_dm_without_preload_content( + self, + create_private_channel_request: CreatePrivateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_dm + + + :param create_private_channel_request: (required) + :type create_private_channel_request: CreatePrivateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dm_serialize( + create_private_channel_request=create_private_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupDmUser201Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_dm_serialize( + self, + create_private_channel_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_private_channel_request is not None: + _body_params = create_private_channel_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/users/@me/channels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_entitlement( + self, + application_id: Annotated[str, Field(strict=True)], + create_entitlement_request_data: CreateEntitlementRequestData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EntitlementResponse: + """create_entitlement + + + :param application_id: (required) + :type application_id: str + :param create_entitlement_request_data: (required) + :type create_entitlement_request_data: CreateEntitlementRequestData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_entitlement_serialize( + application_id=application_id, + create_entitlement_request_data=create_entitlement_request_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_entitlement_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + create_entitlement_request_data: CreateEntitlementRequestData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EntitlementResponse]: + """create_entitlement + + + :param application_id: (required) + :type application_id: str + :param create_entitlement_request_data: (required) + :type create_entitlement_request_data: CreateEntitlementRequestData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_entitlement_serialize( + application_id=application_id, + create_entitlement_request_data=create_entitlement_request_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_entitlement_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + create_entitlement_request_data: CreateEntitlementRequestData, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_entitlement + + + :param application_id: (required) + :type application_id: str + :param create_entitlement_request_data: (required) + :type create_entitlement_request_data: CreateEntitlementRequestData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_entitlement_serialize( + application_id=application_id, + create_entitlement_request_data=create_entitlement_request_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_entitlement_serialize( + self, + application_id, + create_entitlement_request_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_entitlement_request_data is not None: + _body_params = create_entitlement_request_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/entitlements', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild( + self, + guild_create_request: GuildCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildResponse: + """create_guild + + + :param guild_create_request: (required) + :type guild_create_request: GuildCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_serialize( + guild_create_request=guild_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_with_http_info( + self, + guild_create_request: GuildCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildResponse]: + """create_guild + + + :param guild_create_request: (required) + :type guild_create_request: GuildCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_serialize( + guild_create_request=guild_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_without_preload_content( + self, + guild_create_request: GuildCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild + + + :param guild_create_request: (required) + :type guild_create_request: GuildCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_serialize( + guild_create_request=guild_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_serialize( + self, + guild_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if guild_create_request is not None: + _body_params = guild_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """create_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """create_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + application_command_create_request: ApplicationCommandCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param application_command_create_request: (required) + :type application_command_create_request: ApplicationCommandCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + application_command_create_request=application_command_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '201': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_application_command_serialize( + self, + application_id, + guild_id, + application_command_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_create_request is not None: + _body_params = application_command_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_channel( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_channel_request: CreateGuildChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildChannelResponse: + """create_guild_channel + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_channel_request: (required) + :type create_guild_channel_request: CreateGuildChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_channel_serialize( + guild_id=guild_id, + create_guild_channel_request=create_guild_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildChannelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_channel_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_channel_request: CreateGuildChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildChannelResponse]: + """create_guild_channel + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_channel_request: (required) + :type create_guild_channel_request: CreateGuildChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_channel_serialize( + guild_id=guild_id, + create_guild_channel_request=create_guild_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildChannelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_channel_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_channel_request: CreateGuildChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_channel + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_channel_request: (required) + :type create_guild_channel_request: CreateGuildChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_channel_serialize( + guild_id=guild_id, + create_guild_channel_request=create_guild_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildChannelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_channel_serialize( + self, + guild_id, + create_guild_channel_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_channel_request is not None: + _body_params = create_guild_channel_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/channels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_emoji( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_emoji_request: CreateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """create_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_emoji_request: (required) + :type create_guild_emoji_request: CreateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_emoji_serialize( + guild_id=guild_id, + create_guild_emoji_request=create_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_emoji_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_emoji_request: CreateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """create_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_emoji_request: (required) + :type create_guild_emoji_request: CreateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_emoji_serialize( + guild_id=guild_id, + create_guild_emoji_request=create_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_emoji_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_emoji_request: CreateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_emoji_request: (required) + :type create_guild_emoji_request: CreateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_emoji_serialize( + guild_id=guild_id, + create_guild_emoji_request=create_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_emoji_serialize( + self, + guild_id, + create_guild_emoji_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_emoji_request is not None: + _body_params = create_guild_emoji_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/emojis', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_from_template( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + create_guild_from_template_request: CreateGuildFromTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildResponse: + """create_guild_from_template + + + :param code: (required) + :type code: str + :param create_guild_from_template_request: (required) + :type create_guild_from_template_request: CreateGuildFromTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_from_template_serialize( + code=code, + create_guild_from_template_request=create_guild_from_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_from_template_with_http_info( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + create_guild_from_template_request: CreateGuildFromTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildResponse]: + """create_guild_from_template + + + :param code: (required) + :type code: str + :param create_guild_from_template_request: (required) + :type create_guild_from_template_request: CreateGuildFromTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_from_template_serialize( + code=code, + create_guild_from_template_request=create_guild_from_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_from_template_without_preload_content( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + create_guild_from_template_request: CreateGuildFromTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_from_template + + + :param code: (required) + :type code: str + :param create_guild_from_template_request: (required) + :type create_guild_from_template_request: CreateGuildFromTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_from_template_serialize( + code=code, + create_guild_from_template_request=create_guild_from_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_from_template_serialize( + self, + code, + create_guild_from_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_from_template_request is not None: + _body_params = create_guild_from_template_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/templates/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_role( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildRoleResponse: + """create_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_role_serialize( + guild_id=guild_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildRoleResponse]: + """create_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_role_serialize( + guild_id=guild_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_role_serialize( + guild_id=guild_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_role_serialize( + self, + guild_id, + create_guild_role_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_role_request is not None: + _body_params = create_guild_role_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/roles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_scheduled_event( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_scheduled_event_request: CreateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGuildScheduledEvents200ResponseInner: + """create_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_scheduled_event_request: (required) + :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_scheduled_event_serialize( + guild_id=guild_id, + create_guild_scheduled_event_request=create_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_scheduled_event_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_scheduled_event_request: CreateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]: + """create_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_scheduled_event_request: (required) + :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_scheduled_event_serialize( + guild_id=guild_id, + create_guild_scheduled_event_request=create_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_scheduled_event_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_scheduled_event_request: CreateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_scheduled_event_request: (required) + :type create_guild_scheduled_event_request: CreateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_scheduled_event_serialize( + guild_id=guild_id, + create_guild_scheduled_event_request=create_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_scheduled_event_serialize( + self, + guild_id, + create_guild_scheduled_event_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_scheduled_event_request is not None: + _body_params = create_guild_scheduled_event_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/scheduled-events', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_soundboard_sound( + self, + guild_id: Annotated[str, Field(strict=True)], + soundboard_create_request: SoundboardCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SoundboardSoundResponse: + """create_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param soundboard_create_request: (required) + :type soundboard_create_request: SoundboardCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_soundboard_sound_serialize( + guild_id=guild_id, + soundboard_create_request=soundboard_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_soundboard_sound_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + soundboard_create_request: SoundboardCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SoundboardSoundResponse]: + """create_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param soundboard_create_request: (required) + :type soundboard_create_request: SoundboardCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_soundboard_sound_serialize( + guild_id=guild_id, + soundboard_create_request=soundboard_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_soundboard_sound_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + soundboard_create_request: SoundboardCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param soundboard_create_request: (required) + :type soundboard_create_request: SoundboardCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_soundboard_sound_serialize( + guild_id=guild_id, + soundboard_create_request=soundboard_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_soundboard_sound_serialize( + self, + guild_id, + soundboard_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if soundboard_create_request is not None: + _body_params = soundboard_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/soundboard-sounds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_sticker( + self, + guild_id: Annotated[str, Field(strict=True)], + name: Annotated[str, Field(min_length=2, strict=True, max_length=30)], + tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)], + file: StrictStr, + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildStickerResponse: + """create_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param name: (required) + :type name: str + :param tags: (required) + :type tags: str + :param file: (required) + :type file: str + :param description: + :type description: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_sticker_serialize( + guild_id=guild_id, + name=name, + tags=tags, + file=file, + description=description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_sticker_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + name: Annotated[str, Field(min_length=2, strict=True, max_length=30)], + tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)], + file: StrictStr, + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildStickerResponse]: + """create_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param name: (required) + :type name: str + :param tags: (required) + :type tags: str + :param file: (required) + :type file: str + :param description: + :type description: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_sticker_serialize( + guild_id=guild_id, + name=name, + tags=tags, + file=file, + description=description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_sticker_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + name: Annotated[str, Field(min_length=2, strict=True, max_length=30)], + tags: Annotated[str, Field(min_length=1, strict=True, max_length=200)], + file: StrictStr, + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param name: (required) + :type name: str + :param tags: (required) + :type tags: str + :param file: (required) + :type file: str + :param description: + :type description: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_sticker_serialize( + guild_id=guild_id, + name=name, + tags=tags, + file=file, + description=description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_sticker_serialize( + self, + guild_id, + name, + tags, + file, + description, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + if name is not None: + _form_params.append(('name', name)) + if tags is not None: + _form_params.append(('tags', tags)) + if description is not None: + _form_params.append(('description', description)) + if file is not None: + _form_params.append(('file', file)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/stickers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_guild_template( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_template_request: CreateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildTemplateResponse: + """create_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_template_request: (required) + :type create_guild_template_request: CreateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_template_serialize( + guild_id=guild_id, + create_guild_template_request=create_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_guild_template_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_template_request: CreateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildTemplateResponse]: + """create_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_template_request: (required) + :type create_guild_template_request: CreateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_template_serialize( + guild_id=guild_id, + create_guild_template_request=create_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_guild_template_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + create_guild_template_request: CreateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param create_guild_template_request: (required) + :type create_guild_template_request: CreateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_guild_template_serialize( + guild_id=guild_id, + create_guild_template_request=create_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_guild_template_serialize( + self, + guild_id, + create_guild_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_template_request is not None: + _body_params = create_guild_template_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_interaction_response( + self, + interaction_id: Annotated[str, Field(strict=True)], + interaction_token: Annotated[str, Field(strict=True, max_length=152133)], + create_interaction_response_request: CreateInteractionResponseRequest, + with_response: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InteractionCallbackResponse: + """create_interaction_response + + + :param interaction_id: (required) + :type interaction_id: str + :param interaction_token: (required) + :type interaction_token: str + :param create_interaction_response_request: (required) + :type create_interaction_response_request: CreateInteractionResponseRequest + :param with_response: + :type with_response: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_interaction_response_serialize( + interaction_id=interaction_id, + interaction_token=interaction_token, + create_interaction_response_request=create_interaction_response_request, + with_response=with_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InteractionCallbackResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_interaction_response_with_http_info( + self, + interaction_id: Annotated[str, Field(strict=True)], + interaction_token: Annotated[str, Field(strict=True, max_length=152133)], + create_interaction_response_request: CreateInteractionResponseRequest, + with_response: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InteractionCallbackResponse]: + """create_interaction_response + + + :param interaction_id: (required) + :type interaction_id: str + :param interaction_token: (required) + :type interaction_token: str + :param create_interaction_response_request: (required) + :type create_interaction_response_request: CreateInteractionResponseRequest + :param with_response: + :type with_response: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_interaction_response_serialize( + interaction_id=interaction_id, + interaction_token=interaction_token, + create_interaction_response_request=create_interaction_response_request, + with_response=with_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InteractionCallbackResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_interaction_response_without_preload_content( + self, + interaction_id: Annotated[str, Field(strict=True)], + interaction_token: Annotated[str, Field(strict=True, max_length=152133)], + create_interaction_response_request: CreateInteractionResponseRequest, + with_response: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_interaction_response + + + :param interaction_id: (required) + :type interaction_id: str + :param interaction_token: (required) + :type interaction_token: str + :param create_interaction_response_request: (required) + :type create_interaction_response_request: CreateInteractionResponseRequest + :param with_response: + :type with_response: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_interaction_response_serialize( + interaction_id=interaction_id, + interaction_token=interaction_token, + create_interaction_response_request=create_interaction_response_request, + with_response=with_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InteractionCallbackResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_interaction_response_serialize( + self, + interaction_id, + interaction_token, + create_interaction_response_request, + with_response, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interaction_id is not None: + _path_params['interaction_id'] = interaction_id + if interaction_token is not None: + _path_params['interaction_token'] = interaction_token + # process the query parameters + if with_response is not None: + + _query_params.append(('with_response', with_response)) + + # process the header parameters + # process the form parameters + # process the body parameter + if create_interaction_response_request is not None: + _body_params = create_interaction_response_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/interactions/{interaction_id}/{interaction_token}/callback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_lobby( + self, + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyResponse: + """create_lobby + + + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_serialize( + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_lobby_with_http_info( + self, + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyResponse]: + """create_lobby + + + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_serialize( + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_lobby_without_preload_content( + self, + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_lobby + + + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_serialize( + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lobby_serialize( + self, + create_lobby_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_lobby_request is not None: + _body_params = create_lobby_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/lobbies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_lobby_message( + self, + lobby_id: Annotated[str, Field(strict=True)], + sdk_message_request: SDKMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyMessageResponse: + """create_lobby_message + + + :param lobby_id: (required) + :type lobby_id: str + :param sdk_message_request: (required) + :type sdk_message_request: SDKMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_message_serialize( + lobby_id=lobby_id, + sdk_message_request=sdk_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyMessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_lobby_message_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + sdk_message_request: SDKMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyMessageResponse]: + """create_lobby_message + + + :param lobby_id: (required) + :type lobby_id: str + :param sdk_message_request: (required) + :type sdk_message_request: SDKMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_message_serialize( + lobby_id=lobby_id, + sdk_message_request=sdk_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyMessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_lobby_message_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + sdk_message_request: SDKMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_lobby_message + + + :param lobby_id: (required) + :type lobby_id: str + :param sdk_message_request: (required) + :type sdk_message_request: SDKMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lobby_message_serialize( + lobby_id=lobby_id, + sdk_message_request=sdk_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LobbyMessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lobby_message_serialize( + self, + lobby_id, + sdk_message_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if sdk_message_request is not None: + _body_params = sdk_message_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/lobbies/{lobby_id}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_create_request: MessageCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """create_message + + + :param channel_id: (required) + :type channel_id: str + :param message_create_request: (required) + :type message_create_request: MessageCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_message_serialize( + channel_id=channel_id, + message_create_request=message_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_create_request: MessageCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """create_message + + + :param channel_id: (required) + :type channel_id: str + :param message_create_request: (required) + :type message_create_request: MessageCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_message_serialize( + channel_id=channel_id, + message_create_request=message_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_create_request: MessageCreateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_message + + + :param channel_id: (required) + :type channel_id: str + :param message_create_request: (required) + :type message_create_request: MessageCreateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_message_serialize( + channel_id=channel_id, + message_create_request=message_create_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_message_serialize( + self, + channel_id, + message_create_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if message_create_request is not None: + _body_params = message_create_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_or_join_lobby( + self, + create_or_join_lobby_request: CreateOrJoinLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyResponse: + """create_or_join_lobby + + + :param create_or_join_lobby_request: (required) + :type create_or_join_lobby_request: CreateOrJoinLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_or_join_lobby_serialize( + create_or_join_lobby_request=create_or_join_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_or_join_lobby_with_http_info( + self, + create_or_join_lobby_request: CreateOrJoinLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyResponse]: + """create_or_join_lobby + + + :param create_or_join_lobby_request: (required) + :type create_or_join_lobby_request: CreateOrJoinLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_or_join_lobby_serialize( + create_or_join_lobby_request=create_or_join_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_or_join_lobby_without_preload_content( + self, + create_or_join_lobby_request: CreateOrJoinLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_or_join_lobby + + + :param create_or_join_lobby_request: (required) + :type create_or_join_lobby_request: CreateOrJoinLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_or_join_lobby_serialize( + create_or_join_lobby_request=create_or_join_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_or_join_lobby_serialize( + self, + create_or_join_lobby_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_or_join_lobby_request is not None: + _body_params = create_or_join_lobby_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/lobbies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_pin( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_pin_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_pin_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_pin_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/messages/pins/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_stage_instance( + self, + create_stage_instance_request: CreateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StageInstanceResponse: + """create_stage_instance + + + :param create_stage_instance_request: (required) + :type create_stage_instance_request: CreateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_stage_instance_serialize( + create_stage_instance_request=create_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_stage_instance_with_http_info( + self, + create_stage_instance_request: CreateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StageInstanceResponse]: + """create_stage_instance + + + :param create_stage_instance_request: (required) + :type create_stage_instance_request: CreateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_stage_instance_serialize( + create_stage_instance_request=create_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_stage_instance_without_preload_content( + self, + create_stage_instance_request: CreateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_stage_instance + + + :param create_stage_instance_request: (required) + :type create_stage_instance_request: CreateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_stage_instance_serialize( + create_stage_instance_request=create_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_stage_instance_serialize( + self, + create_stage_instance_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_stage_instance_request is not None: + _body_params = create_stage_instance_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/stage-instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_thread( + self, + channel_id: Annotated[str, Field(strict=True)], + create_thread_request: CreateThreadRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreatedThreadResponse: + """create_thread + + + :param channel_id: (required) + :type channel_id: str + :param create_thread_request: (required) + :type create_thread_request: CreateThreadRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_serialize( + channel_id=channel_id, + create_thread_request=create_thread_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_thread_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + create_thread_request: CreateThreadRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreatedThreadResponse]: + """create_thread + + + :param channel_id: (required) + :type channel_id: str + :param create_thread_request: (required) + :type create_thread_request: CreateThreadRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_serialize( + channel_id=channel_id, + create_thread_request=create_thread_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_thread_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + create_thread_request: CreateThreadRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_thread + + + :param channel_id: (required) + :type channel_id: str + :param create_thread_request: (required) + :type create_thread_request: CreateThreadRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_serialize( + channel_id=channel_id, + create_thread_request=create_thread_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_thread_serialize( + self, + channel_id, + create_thread_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_thread_request is not None: + _body_params = create_thread_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/threads', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_thread_from_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + create_text_thread_with_message_request: CreateTextThreadWithMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadResponse: + """create_thread_from_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param create_text_thread_with_message_request: (required) + :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_from_message_serialize( + channel_id=channel_id, + message_id=message_id, + create_text_thread_with_message_request=create_text_thread_with_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_thread_from_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + create_text_thread_with_message_request: CreateTextThreadWithMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadResponse]: + """create_thread_from_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param create_text_thread_with_message_request: (required) + :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_from_message_serialize( + channel_id=channel_id, + message_id=message_id, + create_text_thread_with_message_request=create_text_thread_with_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_thread_from_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + create_text_thread_with_message_request: CreateTextThreadWithMessageRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_thread_from_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param create_text_thread_with_message_request: (required) + :type create_text_thread_with_message_request: CreateTextThreadWithMessageRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_thread_from_message_serialize( + channel_id=channel_id, + message_id=message_id, + create_text_thread_with_message_request=create_text_thread_with_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ThreadResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_thread_from_message_serialize( + self, + channel_id, + message_id, + create_text_thread_with_message_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_text_thread_with_message_request is not None: + _body_params = create_text_thread_with_message_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/messages/{message_id}/threads', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_webhook( + self, + channel_id: Annotated[str, Field(strict=True)], + create_webhook_request: CreateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildIncomingWebhookResponse: + """create_webhook + + + :param channel_id: (required) + :type channel_id: str + :param create_webhook_request: (required) + :type create_webhook_request: CreateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_serialize( + channel_id=channel_id, + create_webhook_request=create_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildIncomingWebhookResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_webhook_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + create_webhook_request: CreateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildIncomingWebhookResponse]: + """create_webhook + + + :param channel_id: (required) + :type channel_id: str + :param create_webhook_request: (required) + :type create_webhook_request: CreateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_serialize( + channel_id=channel_id, + create_webhook_request=create_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildIncomingWebhookResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_webhook_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + create_webhook_request: CreateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_webhook + + + :param channel_id: (required) + :type channel_id: str + :param create_webhook_request: (required) + :type create_webhook_request: CreateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_webhook_serialize( + channel_id=channel_id, + create_webhook_request=create_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildIncomingWebhookResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_webhook_serialize( + self, + channel_id, + create_webhook_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_webhook_request is not None: + _body_params = create_webhook_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/webhooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def crosspost_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """crosspost_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._crosspost_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def crosspost_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """crosspost_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._crosspost_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def crosspost_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """crosspost_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._crosspost_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _crosspost_message_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/messages/{message_id}/crosspost', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_all_message_reactions( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_all_message_reactions + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_all_message_reactions_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_all_message_reactions + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_all_message_reactions_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_all_message_reactions + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_all_message_reactions_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_all_message_reactions_by_emoji( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_all_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_all_message_reactions_by_emoji_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_all_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_all_message_reactions_by_emoji_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_all_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_all_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_all_message_reactions_by_emoji_serialize( + self, + channel_id, + message_id, + emoji_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if emoji_name is not None: + _path_params['emoji_name'] = emoji_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_application_command_serialize( + self, + application_id, + command_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/applications/{application_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_application_emoji( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_application_emoji_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_application_emoji_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_application_emoji_serialize( + self, + application_id, + emoji_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/applications/{application_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_application_user_role_connection( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_application_user_role_connection_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_application_user_role_connection_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_application_user_role_connection_serialize( + self, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/users/@me/applications/{application_id}/role-connection', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_auto_moderation_rule( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_auto_moderation_rule_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_auto_moderation_rule_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_auto_moderation_rule_serialize( + self, + guild_id, + rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if rule_id is not None: + _path_params['rule_id'] = rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_channel( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetChannel200Response: + """delete_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_channel_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetChannel200Response]: + """delete_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_channel_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_channel_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_channel_permission_overwrite( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_channel_permission_overwrite_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_channel_permission_overwrite_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_channel_permission_overwrite_serialize( + self, + channel_id, + overwrite_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if overwrite_id is not None: + _path_params['overwrite_id'] = overwrite_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/permissions/{overwrite_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_entitlement( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_entitlement_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_entitlement_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_entitlement_serialize( + self, + application_id, + entitlement_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if entitlement_id is not None: + _path_params['entitlement_id'] = entitlement_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/applications/{application_id}/entitlements/{entitlement_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_group_dm_user( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_group_dm_user_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_group_dm_user_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_group_dm_user + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_dm_user_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_group_dm_user_serialize( + self, + channel_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/recipients/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_application_command_serialize( + self, + application_id, + guild_id, + command_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_emoji( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_emoji_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_emoji_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_emoji_serialize( + self, + guild_id, + emoji_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_integration( + self, + guild_id: Annotated[str, Field(strict=True)], + integration_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_integration + + + :param guild_id: (required) + :type guild_id: str + :param integration_id: (required) + :type integration_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_integration_serialize( + guild_id=guild_id, + integration_id=integration_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_integration_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + integration_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_integration + + + :param guild_id: (required) + :type guild_id: str + :param integration_id: (required) + :type integration_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_integration_serialize( + guild_id=guild_id, + integration_id=integration_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_integration_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + integration_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_integration + + + :param guild_id: (required) + :type guild_id: str + :param integration_id: (required) + :type integration_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_integration_serialize( + guild_id=guild_id, + integration_id=integration_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_integration_serialize( + self, + guild_id, + integration_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if integration_id is not None: + _path_params['integration_id'] = integration_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/integrations/{integration_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_member_serialize( + self, + guild_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_member_role( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_member_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_member_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_member_role + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_member_role_serialize( + guild_id=guild_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_member_role_serialize( + self, + guild_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + if role_id is not None: + _path_params['role_id'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/members/{user_id}/roles/{role_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_role( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_role_serialize( + self, + guild_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if role_id is not None: + _path_params['role_id'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/roles/{role_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_scheduled_event( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_scheduled_event_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_scheduled_event_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_scheduled_event_serialize( + self, + guild_id, + guild_scheduled_event_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if guild_scheduled_event_id is not None: + _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_soundboard_sound( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_soundboard_sound_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_soundboard_sound_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_soundboard_sound_serialize( + self, + guild_id, + sound_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sound_id is not None: + _path_params['sound_id'] = sound_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_sticker( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_sticker_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_sticker_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_sticker_serialize( + self, + guild_id, + sticker_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sticker_id is not None: + _path_params['sticker_id'] = sticker_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/stickers/{sticker_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_guild_template( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildTemplateResponse: + """delete_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_guild_template_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildTemplateResponse]: + """delete_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_guild_template_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_guild_template_serialize( + self, + guild_id, + code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/templates/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_lobby_member( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_lobby_member_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_lobby_member_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_lobby_member + + + :param lobby_id: (required) + :type lobby_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lobby_member_serialize( + lobby_id=lobby_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_lobby_member_serialize( + self, + lobby_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/lobbies/{lobby_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_message_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_my_message_reaction( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_my_message_reaction_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_my_message_reaction_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_my_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_my_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_my_message_reaction_serialize( + self, + channel_id, + message_id, + emoji_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if emoji_name is not None: + _path_params['emoji_name'] = emoji_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_original_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_original_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_original_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_original_webhook_message_serialize( + self, + webhook_id, + webhook_token, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_pin( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_pin_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_pin_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_pin_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/pins/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_stage_instance( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_stage_instance_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_stage_instance_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_stage_instance_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/stage-instances/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_thread_member( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_thread_member_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_thread_member_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_thread_member_serialize( + self, + channel_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/thread-members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_user_message_reaction( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_user_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_user_message_reaction_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_user_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_user_message_reaction_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_user_message_reaction + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_message_reaction_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_user_message_reaction_serialize( + self, + channel_id, + message_id, + emoji_name, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if emoji_name is not None: + _path_params['emoji_name'] = emoji_name + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_webhook_serialize( + self, + webhook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/webhooks/{webhook_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_webhook_by_token( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_webhook_by_token_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_webhook_by_token_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_webhook_by_token_serialize( + self, + webhook_id, + webhook_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/webhooks/{webhook_id}/{webhook_token}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_webhook_message_serialize( + self, + webhook_id, + webhook_token, + message_id, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def deprecated_create_pin( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """deprecated_create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def deprecated_create_pin_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """deprecated_create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def deprecated_create_pin_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deprecated_create_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_create_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _deprecated_create_pin_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/pins/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def deprecated_delete_pin( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """deprecated_delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def deprecated_delete_pin_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """deprecated_delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def deprecated_delete_pin_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deprecated_delete_pin + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_delete_pin_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _deprecated_delete_pin_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/pins/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def deprecated_list_pins( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MessageResponse]: + """deprecated_list_pins + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_list_pins_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def deprecated_list_pins_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MessageResponse]]: + """deprecated_list_pins + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_list_pins_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def deprecated_list_pins_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deprecated_list_pins + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deprecated_list_pins_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _deprecated_list_pins_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/pins', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def edit_lobby( + self, + lobby_id: Annotated[str, Field(strict=True)], + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyResponse: + """edit_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_serialize( + lobby_id=lobby_id, + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def edit_lobby_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyResponse]: + """edit_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_serialize( + lobby_id=lobby_id, + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def edit_lobby_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + create_lobby_request: CreateLobbyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """edit_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param create_lobby_request: (required) + :type create_lobby_request: CreateLobbyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_serialize( + lobby_id=lobby_id, + create_lobby_request=create_lobby_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_lobby_serialize( + self, + lobby_id, + create_lobby_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_lobby_request is not None: + _body_params = create_lobby_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/lobbies/{lobby_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def edit_lobby_channel_link( + self, + lobby_id: Annotated[str, Field(strict=True)], + edit_lobby_channel_link_request: EditLobbyChannelLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyResponse: + """edit_lobby_channel_link + + + :param lobby_id: (required) + :type lobby_id: str + :param edit_lobby_channel_link_request: (required) + :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_channel_link_serialize( + lobby_id=lobby_id, + edit_lobby_channel_link_request=edit_lobby_channel_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def edit_lobby_channel_link_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + edit_lobby_channel_link_request: EditLobbyChannelLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyResponse]: + """edit_lobby_channel_link + + + :param lobby_id: (required) + :type lobby_id: str + :param edit_lobby_channel_link_request: (required) + :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_channel_link_serialize( + lobby_id=lobby_id, + edit_lobby_channel_link_request=edit_lobby_channel_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def edit_lobby_channel_link_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + edit_lobby_channel_link_request: EditLobbyChannelLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """edit_lobby_channel_link + + + :param lobby_id: (required) + :type lobby_id: str + :param edit_lobby_channel_link_request: (required) + :type edit_lobby_channel_link_request: EditLobbyChannelLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_lobby_channel_link_serialize( + lobby_id=lobby_id, + edit_lobby_channel_link_request=edit_lobby_channel_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_lobby_channel_link_serialize( + self, + lobby_id, + edit_lobby_channel_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edit_lobby_channel_link_request is not None: + _body_params = edit_lobby_channel_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/lobbies/{lobby_id}/channel-linking', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def execute_github_compatible_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + github_webhook: GithubWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """execute_github_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param github_webhook: (required) + :type github_webhook: GithubWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_github_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + github_webhook=github_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def execute_github_compatible_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + github_webhook: GithubWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """execute_github_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param github_webhook: (required) + :type github_webhook: GithubWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_github_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + github_webhook=github_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def execute_github_compatible_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + github_webhook: GithubWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """execute_github_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param github_webhook: (required) + :type github_webhook: GithubWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_github_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + github_webhook=github_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _execute_github_compatible_webhook_serialize( + self, + webhook_id, + webhook_token, + github_webhook, + wait, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if wait is not None: + + _query_params.append(('wait', wait)) + + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + if github_webhook is not None: + _body_params = github_webhook + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/webhooks/{webhook_id}/{webhook_token}/github', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def execute_slack_compatible_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + slack_webhook: SlackWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """execute_slack_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param slack_webhook: (required) + :type slack_webhook: SlackWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_slack_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + slack_webhook=slack_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def execute_slack_compatible_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + slack_webhook: SlackWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """execute_slack_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param slack_webhook: (required) + :type slack_webhook: SlackWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_slack_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + slack_webhook=slack_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def execute_slack_compatible_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + slack_webhook: SlackWebhook, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """execute_slack_compatible_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param slack_webhook: (required) + :type slack_webhook: SlackWebhook + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_slack_compatible_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + slack_webhook=slack_webhook, + wait=wait, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _execute_slack_compatible_webhook_serialize( + self, + webhook_id, + webhook_token, + slack_webhook, + wait, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if wait is not None: + + _query_params.append(('wait', wait)) + + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + if slack_webhook is not None: + _body_params = slack_webhook + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/webhooks/{webhook_id}/{webhook_token}/slack', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def execute_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + execute_webhook_request: ExecuteWebhookRequest, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """execute_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param execute_webhook_request: (required) + :type execute_webhook_request: ExecuteWebhookRequest + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + execute_webhook_request=execute_webhook_request, + wait=wait, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def execute_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + execute_webhook_request: ExecuteWebhookRequest, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """execute_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param execute_webhook_request: (required) + :type execute_webhook_request: ExecuteWebhookRequest + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + execute_webhook_request=execute_webhook_request, + wait=wait, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def execute_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + execute_webhook_request: ExecuteWebhookRequest, + wait: Optional[StrictBool] = None, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """execute_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param execute_webhook_request: (required) + :type execute_webhook_request: ExecuteWebhookRequest + :param wait: + :type wait: bool + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._execute_webhook_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + execute_webhook_request=execute_webhook_request, + wait=wait, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _execute_webhook_serialize( + self, + webhook_id, + webhook_token, + execute_webhook_request, + wait, + thread_id, + with_components, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if wait is not None: + + _query_params.append(('wait', wait)) + + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + if with_components is not None: + + _query_params.append(('with_components', with_components)) + + # process the header parameters + # process the form parameters + # process the body parameter + if execute_webhook_request is not None: + _body_params = execute_webhook_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/webhooks/{webhook_id}/{webhook_token}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def follow_channel( + self, + channel_id: Annotated[str, Field(strict=True)], + follow_channel_request: FollowChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChannelFollowerResponse: + """follow_channel + + + :param channel_id: (required) + :type channel_id: str + :param follow_channel_request: (required) + :type follow_channel_request: FollowChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._follow_channel_serialize( + channel_id=channel_id, + follow_channel_request=follow_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChannelFollowerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def follow_channel_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + follow_channel_request: FollowChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChannelFollowerResponse]: + """follow_channel + + + :param channel_id: (required) + :type channel_id: str + :param follow_channel_request: (required) + :type follow_channel_request: FollowChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._follow_channel_serialize( + channel_id=channel_id, + follow_channel_request=follow_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChannelFollowerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def follow_channel_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + follow_channel_request: FollowChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """follow_channel + + + :param channel_id: (required) + :type channel_id: str + :param follow_channel_request: (required) + :type follow_channel_request: FollowChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._follow_channel_serialize( + channel_id=channel_id, + follow_channel_request=follow_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChannelFollowerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _follow_channel_serialize( + self, + channel_id, + follow_channel_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if follow_channel_request is not None: + _body_params = follow_channel_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/followers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_active_guild_threads( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadsResponse: + """get_active_guild_threads + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_guild_threads_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_active_guild_threads_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadsResponse]: + """get_active_guild_threads + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_guild_threads_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_active_guild_threads_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_active_guild_threads + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_guild_threads_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_active_guild_threads_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/threads/active', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_answer_voters( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + answer_id: Annotated[int, Field(le=10, strict=True, ge=1)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PollAnswerDetailsResponse: + """get_answer_voters + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param answer_id: (required) + :type answer_id: int + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_answer_voters_serialize( + channel_id=channel_id, + message_id=message_id, + answer_id=answer_id, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PollAnswerDetailsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_answer_voters_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + answer_id: Annotated[int, Field(le=10, strict=True, ge=1)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PollAnswerDetailsResponse]: + """get_answer_voters + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param answer_id: (required) + :type answer_id: int + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_answer_voters_serialize( + channel_id=channel_id, + message_id=message_id, + answer_id=answer_id, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PollAnswerDetailsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_answer_voters_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + answer_id: Annotated[int, Field(le=10, strict=True, ge=1)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_answer_voters + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param answer_id: (required) + :type answer_id: int + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_answer_voters_serialize( + channel_id=channel_id, + message_id=message_id, + answer_id=answer_id, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PollAnswerDetailsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_answer_voters_serialize( + self, + channel_id, + message_id, + answer_id, + after, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if answer_id is not None: + _path_params['answer_id'] = answer_id + # process the query parameters + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/polls/{message_id}/answers/{answer_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_application( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateApplicationResponse: + """get_application + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_application_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateApplicationResponse]: + """get_application + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_application_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_application + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_serialize( + self, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """get_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """get_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_command_serialize( + application_id=application_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_command_serialize( + self, + application_id, + command_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_application_emoji( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """get_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_application_emoji_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """get_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_application_emoji_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_emoji_serialize( + self, + application_id, + emoji_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_application_role_connections_metadata( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationRoleConnectionsMetadataItemResponse]: + """get_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_role_connections_metadata_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_application_role_connections_metadata_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationRoleConnectionsMetadataItemResponse]]: + """get_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_role_connections_metadata_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_application_role_connections_metadata_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_role_connections_metadata_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_role_connections_metadata_serialize( + self, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/role-connections/metadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_application_user_role_connection( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationUserRoleConnectionResponse: + """get_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_application_user_role_connection_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationUserRoleConnectionResponse]: + """get_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_application_user_role_connection_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_user_role_connection_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_application_user_role_connection_serialize( + self, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/@me/applications/{application_id}/role-connection', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_auto_moderation_rule( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateAutoModerationRule200Response: + """get_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_auto_moderation_rule_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateAutoModerationRule200Response]: + """get_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_auto_moderation_rule_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_auto_moderation_rule_serialize( + self, + guild_id, + rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if rule_id is not None: + _path_params['rule_id'] = rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_bot_gateway( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GatewayBotResponse: + """get_bot_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_bot_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayBotResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_bot_gateway_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GatewayBotResponse]: + """get_bot_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_bot_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayBotResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_bot_gateway_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_bot_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_bot_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayBotResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_bot_gateway_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/gateway/bot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_channel( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetChannel200Response: + """get_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_channel_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetChannel200Response]: + """get_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_channel_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_channel + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_channel_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_channel_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_entitlement( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EntitlementResponse: + """get_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_entitlement_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EntitlementResponse]: + """get_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_entitlement_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + entitlement_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_entitlement + + + :param application_id: (required) + :type application_id: str + :param entitlement_id: (required) + :type entitlement_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlement_serialize( + application_id=application_id, + entitlement_id=entitlement_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EntitlementResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entitlement_serialize( + self, + application_id, + entitlement_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if entitlement_id is not None: + _path_params['entitlement_id'] = entitlement_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/entitlements/{entitlement_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_entitlements( + self, + sku_ids: Any, + application_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + guild_id: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + exclude_ended: Optional[StrictBool] = None, + exclude_deleted: Optional[StrictBool] = None, + only_active: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Optional[EntitlementResponse]]: + """get_entitlements + + + :param sku_ids: (required) + :type sku_ids: GetEntitlementsSkuIdsParameter + :param application_id: (required) + :type application_id: str + :param user_id: + :type user_id: str + :param guild_id: + :type guild_id: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param exclude_ended: + :type exclude_ended: bool + :param exclude_deleted: + :type exclude_deleted: bool + :param only_active: + :type only_active: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlements_serialize( + sku_ids=sku_ids, + application_id=application_id, + user_id=user_id, + guild_id=guild_id, + before=before, + after=after, + limit=limit, + exclude_ended=exclude_ended, + exclude_deleted=exclude_deleted, + only_active=only_active, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Optional[EntitlementResponse]]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_entitlements_with_http_info( + self, + sku_ids: Any, + application_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + guild_id: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + exclude_ended: Optional[StrictBool] = None, + exclude_deleted: Optional[StrictBool] = None, + only_active: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Optional[EntitlementResponse]]]: + """get_entitlements + + + :param sku_ids: (required) + :type sku_ids: GetEntitlementsSkuIdsParameter + :param application_id: (required) + :type application_id: str + :param user_id: + :type user_id: str + :param guild_id: + :type guild_id: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param exclude_ended: + :type exclude_ended: bool + :param exclude_deleted: + :type exclude_deleted: bool + :param only_active: + :type only_active: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlements_serialize( + sku_ids=sku_ids, + application_id=application_id, + user_id=user_id, + guild_id=guild_id, + before=before, + after=after, + limit=limit, + exclude_ended=exclude_ended, + exclude_deleted=exclude_deleted, + only_active=only_active, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Optional[EntitlementResponse]]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_entitlements_without_preload_content( + self, + sku_ids: Any, + application_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + guild_id: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + exclude_ended: Optional[StrictBool] = None, + exclude_deleted: Optional[StrictBool] = None, + only_active: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_entitlements + + + :param sku_ids: (required) + :type sku_ids: GetEntitlementsSkuIdsParameter + :param application_id: (required) + :type application_id: str + :param user_id: + :type user_id: str + :param guild_id: + :type guild_id: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param exclude_ended: + :type exclude_ended: bool + :param exclude_deleted: + :type exclude_deleted: bool + :param only_active: + :type only_active: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_entitlements_serialize( + sku_ids=sku_ids, + application_id=application_id, + user_id=user_id, + guild_id=guild_id, + before=before, + after=after, + limit=limit, + exclude_ended=exclude_ended, + exclude_deleted=exclude_deleted, + only_active=only_active, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Optional[EntitlementResponse]]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_entitlements_serialize( + self, + sku_ids, + application_id, + user_id, + guild_id, + before, + after, + limit, + exclude_ended, + exclude_deleted, + only_active, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + if user_id is not None: + + _query_params.append(('user_id', user_id)) + + if sku_ids is not None: + + _query_params.append(('sku_ids', sku_ids)) + + if guild_id is not None: + + _query_params.append(('guild_id', guild_id)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if exclude_ended is not None: + + _query_params.append(('exclude_ended', exclude_ended)) + + if exclude_deleted is not None: + + _query_params.append(('exclude_deleted', exclude_deleted)) + + if only_active is not None: + + _query_params.append(('only_active', only_active)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/entitlements', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_gateway( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GatewayResponse: + """get_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_gateway_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GatewayResponse]: + """get_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_gateway_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_gateway + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_gateway_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GatewayResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_gateway_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/gateway', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildWithCountsResponse: + """get_guild + + + :param guild_id: (required) + :type guild_id: str + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_serialize( + guild_id=guild_id, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWithCountsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildWithCountsResponse]: + """get_guild + + + :param guild_id: (required) + :type guild_id: str + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_serialize( + guild_id=guild_id, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWithCountsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild + + + :param guild_id: (required) + :type guild_id: str + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_serialize( + guild_id=guild_id, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWithCountsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_serialize( + self, + guild_id, + with_counts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if with_counts is not None: + + _query_params.append(('with_counts', with_counts)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """get_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """get_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_application_command_serialize( + self, + application_id, + guild_id, + command_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_application_command_permissions( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CommandPermissionsResponse: + """get_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_application_command_permissions_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CommandPermissionsResponse]: + """get_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_application_command_permissions_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_application_command_permissions_serialize( + self, + application_id, + guild_id, + command_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_ban( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildBanResponse: + """get_guild_ban + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_ban_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildBanResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_ban_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildBanResponse]: + """get_guild_ban + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_ban_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildBanResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_ban_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_ban + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_ban_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildBanResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_ban_serialize( + self, + guild_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/bans/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_emoji( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """get_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_emoji_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """get_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_emoji_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_emoji_serialize( + self, + guild_id, + emoji_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildMemberResponse: + """get_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildMemberResponse]: + """get_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_member_serialize( + self, + guild_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_new_member_welcome( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildHomeSettingsResponse: + """get_guild_new_member_welcome + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_new_member_welcome_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildHomeSettingsResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_new_member_welcome_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildHomeSettingsResponse]: + """get_guild_new_member_welcome + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_new_member_welcome_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildHomeSettingsResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_new_member_welcome_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_new_member_welcome + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_new_member_welcome_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildHomeSettingsResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_new_member_welcome_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/new-member-welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_preview( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildPreviewResponse: + """get_guild_preview + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_preview_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPreviewResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_preview_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildPreviewResponse]: + """get_guild_preview + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_preview_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPreviewResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_preview_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_preview + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_preview_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPreviewResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_preview_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/preview', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_role( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildRoleResponse: + """get_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildRoleResponse]: + """get_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_role_serialize( + self, + guild_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if role_id is not None: + _path_params['role_id'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/roles/{role_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_scheduled_event( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGuildScheduledEvents200ResponseInner: + """get_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_scheduled_event_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]: + """get_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_scheduled_event_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_scheduled_event_serialize( + self, + guild_id, + guild_scheduled_event_id, + with_user_count, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if guild_scheduled_event_id is not None: + _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id + # process the query parameters + if with_user_count is not None: + + _query_params.append(('with_user_count', with_user_count)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_soundboard_sound( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SoundboardSoundResponse: + """get_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_soundboard_sound_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SoundboardSoundResponse]: + """get_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_soundboard_sound_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_soundboard_sound_serialize( + self, + guild_id, + sound_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sound_id is not None: + _path_params['sound_id'] = sound_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_sticker( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildStickerResponse: + """get_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_sticker_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildStickerResponse]: + """get_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_sticker_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_sticker_serialize( + self, + guild_id, + sticker_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sticker_id is not None: + _path_params['sticker_id'] = sticker_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/stickers/{sticker_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_template( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildTemplateResponse: + """get_guild_template + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_template_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_template_with_http_info( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildTemplateResponse]: + """get_guild_template + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_template_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_template_without_preload_content( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_template + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_template_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_template_serialize( + self, + code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/templates/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_vanity_url( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VanityURLResponse: + """get_guild_vanity_url + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_vanity_url_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VanityURLResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_vanity_url_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VanityURLResponse]: + """get_guild_vanity_url + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_vanity_url_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VanityURLResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_vanity_url_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_vanity_url + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_vanity_url_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VanityURLResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_vanity_url_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/vanity-url', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_webhooks( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListChannelWebhooks200ResponseInner]: + """get_guild_webhooks + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_webhooks_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_webhooks_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListChannelWebhooks200ResponseInner]]: + """get_guild_webhooks + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_webhooks_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_webhooks_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_webhooks + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_webhooks_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_webhooks_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/webhooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_welcome_screen( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildWelcomeScreenResponse: + """get_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_welcome_screen_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_welcome_screen_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildWelcomeScreenResponse]: + """get_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_welcome_screen_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_welcome_screen_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_welcome_screen_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_welcome_screen_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/welcome-screen', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_widget( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WidgetResponse: + """get_guild_widget + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_widget_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WidgetResponse]: + """get_guild_widget + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_widget_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_widget + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_widget_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/widget.json', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_widget_png( + self, + guild_id: Annotated[str, Field(strict=True)], + style: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """get_guild_widget_png + + + :param guild_id: (required) + :type guild_id: str + :param style: + :type style: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_png_serialize( + guild_id=guild_id, + style=style, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_widget_png_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + style: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """get_guild_widget_png + + + :param guild_id: (required) + :type guild_id: str + :param style: + :type style: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_png_serialize( + guild_id=guild_id, + style=style, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_widget_png_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + style: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_widget_png + + + :param guild_id: (required) + :type guild_id: str + :param style: + :type style: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_png_serialize( + guild_id=guild_id, + style=style, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_widget_png_serialize( + self, + guild_id, + style, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if style is not None: + + _query_params.append(('style', style)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'image/png', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/widget.png', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guild_widget_settings( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WidgetSettingsResponse: + """get_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_settings_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guild_widget_settings_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WidgetSettingsResponse]: + """get_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_settings_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guild_widget_settings_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guild_widget_settings_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guild_widget_settings_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/widget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_guilds_onboarding( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserGuildOnboardingResponse: + """get_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guilds_onboarding_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserGuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_guilds_onboarding_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserGuildOnboardingResponse]: + """get_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guilds_onboarding_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserGuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_guilds_onboarding_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_guilds_onboarding_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserGuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_guilds_onboarding_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/onboarding', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_lobby( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LobbyResponse: + """get_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_lobby_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LobbyResponse]: + """get_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_lobby_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LobbyResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_lobby_serialize( + self, + lobby_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/lobbies/{lobby_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_lobby_messages( + self, + lobby_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LobbyMessageResponse]: + """get_lobby_messages + + + :param lobby_id: (required) + :type lobby_id: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_messages_serialize( + lobby_id=lobby_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_lobby_messages_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LobbyMessageResponse]]: + """get_lobby_messages + + + :param lobby_id: (required) + :type lobby_id: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_messages_serialize( + lobby_id=lobby_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_lobby_messages_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_lobby_messages + + + :param lobby_id: (required) + :type lobby_id: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lobby_messages_serialize( + lobby_id=lobby_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LobbyMessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_lobby_messages_serialize( + self, + lobby_id, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/lobbies/{lobby_id}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """get_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """get_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_message_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_message_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_my_application( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateApplicationResponse: + """get_my_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_my_application_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateApplicationResponse]: + """get_my_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_my_application_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_my_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_my_application_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_my_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateGuildMemberResponse: + """get_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_guild_member_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_my_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateGuildMemberResponse]: + """get_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_guild_member_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_my_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_guild_member_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_my_guild_member_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/@me/guilds/{guild_id}/member', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_my_oauth2_application( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateApplicationResponse: + """get_my_oauth2_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_my_oauth2_application_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateApplicationResponse]: + """get_my_oauth2_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_my_oauth2_application_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_my_oauth2_application + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_application_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_my_oauth2_application_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/applications/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_my_oauth2_authorization( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2GetAuthorizationResponse: + """get_my_oauth2_authorization + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_authorization_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetAuthorizationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_my_oauth2_authorization_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2GetAuthorizationResponse]: + """get_my_oauth2_authorization + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_authorization_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetAuthorizationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_my_oauth2_authorization_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_my_oauth2_authorization + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_oauth2_authorization_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetAuthorizationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_my_oauth2_authorization_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_my_user( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserPIIResponse: + """get_my_user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_my_user_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserPIIResponse]: + """get_my_user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_my_user_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_my_user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_my_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_my_user_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_openid_connect_userinfo( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2GetOpenIDConnectUserInfoResponse: + """get_openid_connect_userinfo + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_openid_connect_userinfo_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetOpenIDConnectUserInfoResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_openid_connect_userinfo_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2GetOpenIDConnectUserInfoResponse]: + """get_openid_connect_userinfo + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_openid_connect_userinfo_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetOpenIDConnectUserInfoResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_openid_connect_userinfo_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_openid_connect_userinfo + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_openid_connect_userinfo_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetOpenIDConnectUserInfoResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_openid_connect_userinfo_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/userinfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_original_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """get_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_original_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """get_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_original_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_original_webhook_message_serialize( + self, + webhook_id, + webhook_token, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_public_keys( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2GetKeys: + """get_public_keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_public_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetKeys", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_public_keys_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2GetKeys]: + """get_public_keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_public_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetKeys", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_public_keys_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_public_keys + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_public_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2GetKeys", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_public_keys_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_self_voice_state( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VoiceStateResponse: + """get_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_self_voice_state_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_self_voice_state_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VoiceStateResponse]: + """get_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_self_voice_state_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_self_voice_state_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_self_voice_state_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_self_voice_state_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/voice-states/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_soundboard_default_sounds( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SoundboardSoundResponse]: + """get_soundboard_default_sounds + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_soundboard_default_sounds_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SoundboardSoundResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_soundboard_default_sounds_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SoundboardSoundResponse]]: + """get_soundboard_default_sounds + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_soundboard_default_sounds_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SoundboardSoundResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_soundboard_default_sounds_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_soundboard_default_sounds + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_soundboard_default_sounds_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SoundboardSoundResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_soundboard_default_sounds_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/soundboard-default-sounds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_stage_instance( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StageInstanceResponse: + """get_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_stage_instance_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StageInstanceResponse]: + """get_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_stage_instance_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_stage_instance_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_stage_instance_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/stage-instances/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_sticker( + self, + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetSticker200Response: + """get_sticker + + + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_serialize( + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSticker200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_sticker_with_http_info( + self, + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetSticker200Response]: + """get_sticker + + + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_serialize( + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSticker200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_sticker_without_preload_content( + self, + sticker_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_sticker + + + :param sticker_id: (required) + :type sticker_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_serialize( + sticker_id=sticker_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSticker200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sticker_serialize( + self, + sticker_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if sticker_id is not None: + _path_params['sticker_id'] = sticker_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/stickers/{sticker_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_sticker_pack( + self, + pack_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StickerPackResponse: + """get_sticker_pack + + + :param pack_id: (required) + :type pack_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_pack_serialize( + pack_id=pack_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_sticker_pack_with_http_info( + self, + pack_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StickerPackResponse]: + """get_sticker_pack + + + :param pack_id: (required) + :type pack_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_pack_serialize( + pack_id=pack_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_sticker_pack_without_preload_content( + self, + pack_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_sticker_pack + + + :param pack_id: (required) + :type pack_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_sticker_pack_serialize( + pack_id=pack_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sticker_pack_serialize( + self, + pack_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if pack_id is not None: + _path_params['pack_id'] = pack_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sticker-packs/{pack_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_thread_member( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadMemberResponse: + """get_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param with_member: + :type with_member: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + with_member=with_member, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_thread_member_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadMemberResponse]: + """get_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param with_member: + :type with_member: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + with_member=with_member, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_thread_member_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_thread_member + + + :param channel_id: (required) + :type channel_id: str + :param user_id: (required) + :type user_id: str + :param with_member: + :type with_member: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_thread_member_serialize( + channel_id=channel_id, + user_id=user_id, + with_member=with_member, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_thread_member_serialize( + self, + channel_id, + user_id, + with_member, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + if with_member is not None: + + _query_params.append(('with_member', with_member)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/thread-members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_user( + self, + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserResponse: + """get_user + + + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_with_http_info( + self, + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserResponse]: + """get_user + + + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_without_preload_content( + self, + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_user + + + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_voice_state( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VoiceStateResponse: + """get_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_voice_state_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VoiceStateResponse]: + """get_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_voice_state_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceStateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_voice_state_serialize( + self, + guild_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/voice-states/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelWebhooks200ResponseInner: + """get_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelWebhooks200ResponseInner]: + """get_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_serialize( + webhook_id=webhook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_serialize( + self, + webhook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/webhooks/{webhook_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_webhook_by_token( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelWebhooks200ResponseInner: + """get_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_webhook_by_token_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelWebhooks200ResponseInner]: + """get_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_webhook_by_token_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_by_token_serialize( + self, + webhook_id, + webhook_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/webhooks/{webhook_id}/{webhook_token}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """get_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """get_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param thread_id: + :type thread_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + thread_id=thread_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_message_serialize( + self, + webhook_id, + webhook_token, + message_id, + thread_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def invite_resolve( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + with_counts: Optional[StrictBool] = None, + guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelInvites200ResponseInner: + """invite_resolve + + + :param code: (required) + :type code: str + :param with_counts: + :type with_counts: bool + :param guild_scheduled_event_id: + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_resolve_serialize( + code=code, + with_counts=with_counts, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def invite_resolve_with_http_info( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + with_counts: Optional[StrictBool] = None, + guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelInvites200ResponseInner]: + """invite_resolve + + + :param code: (required) + :type code: str + :param with_counts: + :type with_counts: bool + :param guild_scheduled_event_id: + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_resolve_serialize( + code=code, + with_counts=with_counts, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def invite_resolve_without_preload_content( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + with_counts: Optional[StrictBool] = None, + guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """invite_resolve + + + :param code: (required) + :type code: str + :param with_counts: + :type with_counts: bool + :param guild_scheduled_event_id: + :type guild_scheduled_event_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_resolve_serialize( + code=code, + with_counts=with_counts, + guild_scheduled_event_id=guild_scheduled_event_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_resolve_serialize( + self, + code, + with_counts, + guild_scheduled_event_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if code is not None: + _path_params['code'] = code + # process the query parameters + if with_counts is not None: + + _query_params.append(('with_counts', with_counts)) + + if guild_scheduled_event_id is not None: + + _query_params.append(('guild_scheduled_event_id', guild_scheduled_event_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/invites/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def invite_revoke( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelInvites200ResponseInner: + """invite_revoke + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_revoke_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def invite_revoke_with_http_info( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelInvites200ResponseInner]: + """invite_revoke + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_revoke_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def invite_revoke_without_preload_content( + self, + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """invite_revoke + + + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_revoke_serialize( + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelInvites200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_revoke_serialize( + self, + code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/invites/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def join_thread( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """join_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._join_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def join_thread_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """join_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._join_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def join_thread_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """join_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._join_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _join_thread_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/thread-members/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def leave_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """leave_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def leave_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """leave_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def leave_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """leave_guild + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_guild_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leave_guild_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/users/@me/guilds/{guild_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def leave_lobby( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """leave_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def leave_lobby_with_http_info( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """leave_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def leave_lobby_without_preload_content( + self, + lobby_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """leave_lobby + + + :param lobby_id: (required) + :type lobby_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_lobby_serialize( + lobby_id=lobby_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leave_lobby_serialize( + self, + lobby_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if lobby_id is not None: + _path_params['lobby_id'] = lobby_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/lobbies/{lobby_id}/members/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def leave_thread( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """leave_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def leave_thread_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """leave_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def leave_thread_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """leave_thread + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._leave_thread_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _leave_thread_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/channels/{channel_id}/thread-members/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_application_commands( + self, + application_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationCommandResponse]: + """list_application_commands + + + :param application_id: (required) + :type application_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_commands_serialize( + application_id=application_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_application_commands_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationCommandResponse]]: + """list_application_commands + + + :param application_id: (required) + :type application_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_commands_serialize( + application_id=application_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_application_commands_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_application_commands + + + :param application_id: (required) + :type application_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_commands_serialize( + application_id=application_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_application_commands_serialize( + self, + application_id, + with_localizations, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + if with_localizations is not None: + + _query_params.append(('with_localizations', with_localizations)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_application_emojis( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListApplicationEmojisResponse: + """list_application_emojis + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_emojis_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListApplicationEmojisResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_application_emojis_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListApplicationEmojisResponse]: + """list_application_emojis + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_emojis_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListApplicationEmojisResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_application_emojis_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_application_emojis + + + :param application_id: (required) + :type application_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_emojis_serialize( + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListApplicationEmojisResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_application_emojis_serialize( + self, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/emojis', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_auto_moderation_rules( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListAutoModerationRules200ResponseInner]: + """list_auto_moderation_rules + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auto_moderation_rules_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListAutoModerationRules200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_auto_moderation_rules_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListAutoModerationRules200ResponseInner]]: + """list_auto_moderation_rules + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auto_moderation_rules_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListAutoModerationRules200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_auto_moderation_rules_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_auto_moderation_rules + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auto_moderation_rules_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListAutoModerationRules200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_auto_moderation_rules_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/auto-moderation/rules', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_channel_invites( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListChannelInvites200ResponseInner]: + """list_channel_invites + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_invites_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_channel_invites_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListChannelInvites200ResponseInner]]: + """list_channel_invites + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_invites_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_channel_invites_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_channel_invites + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_invites_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_channel_invites_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_channel_webhooks( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListChannelWebhooks200ResponseInner]: + """list_channel_webhooks + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_webhooks_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_channel_webhooks_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListChannelWebhooks200ResponseInner]]: + """list_channel_webhooks + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_webhooks_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_channel_webhooks_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_channel_webhooks + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_channel_webhooks_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelWebhooks200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_channel_webhooks_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/webhooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_application_command_permissions( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[CommandPermissionsResponse]: + """list_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CommandPermissionsResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_application_command_permissions_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[CommandPermissionsResponse]]: + """list_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CommandPermissionsResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_application_command_permissions_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CommandPermissionsResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_application_command_permissions_serialize( + self, + application_id, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_application_commands( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationCommandResponse]: + """list_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_application_commands_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationCommandResponse]]: + """list_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_application_commands_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + with_localizations: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_application_commands + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param with_localizations: + :type with_localizations: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_application_commands_serialize( + application_id=application_id, + guild_id=guild_id, + with_localizations=with_localizations, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationCommandResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_application_commands_serialize( + self, + application_id, + guild_id, + with_localizations, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if with_localizations is not None: + + _query_params.append(('with_localizations', with_localizations)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_audit_log_entries( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + target_id: Optional[Annotated[str, Field(strict=True)]] = None, + action_type: Optional[StrictInt] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildAuditLogResponse: + """list_guild_audit_log_entries + + + :param guild_id: (required) + :type guild_id: str + :param user_id: + :type user_id: str + :param target_id: + :type target_id: str + :param action_type: + :type action_type: int + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_audit_log_entries_serialize( + guild_id=guild_id, + user_id=user_id, + target_id=target_id, + action_type=action_type, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildAuditLogResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_audit_log_entries_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + target_id: Optional[Annotated[str, Field(strict=True)]] = None, + action_type: Optional[StrictInt] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildAuditLogResponse]: + """list_guild_audit_log_entries + + + :param guild_id: (required) + :type guild_id: str + :param user_id: + :type user_id: str + :param target_id: + :type target_id: str + :param action_type: + :type action_type: int + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_audit_log_entries_serialize( + guild_id=guild_id, + user_id=user_id, + target_id=target_id, + action_type=action_type, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildAuditLogResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_audit_log_entries_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Optional[Annotated[str, Field(strict=True)]] = None, + target_id: Optional[Annotated[str, Field(strict=True)]] = None, + action_type: Optional[StrictInt] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_audit_log_entries + + + :param guild_id: (required) + :type guild_id: str + :param user_id: + :type user_id: str + :param target_id: + :type target_id: str + :param action_type: + :type action_type: int + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_audit_log_entries_serialize( + guild_id=guild_id, + user_id=user_id, + target_id=target_id, + action_type=action_type, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildAuditLogResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_audit_log_entries_serialize( + self, + guild_id, + user_id, + target_id, + action_type, + before, + after, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if user_id is not None: + + _query_params.append(('user_id', user_id)) + + if target_id is not None: + + _query_params.append(('target_id', target_id)) + + if action_type is not None: + + _query_params.append(('action_type', action_type)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/audit-logs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_bans( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildBanResponse]: + """list_guild_bans + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_bans_serialize( + guild_id=guild_id, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildBanResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_bans_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildBanResponse]]: + """list_guild_bans + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_bans_serialize( + guild_id=guild_id, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildBanResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_bans_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_bans + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_bans_serialize( + guild_id=guild_id, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildBanResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_bans_serialize( + self, + guild_id, + limit, + before, + after, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/bans', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_channels( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GetChannel200Response]: + """list_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_channels_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GetChannel200Response]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_channels_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GetChannel200Response]]: + """list_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_channels_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GetChannel200Response]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_channels_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_channels + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_channels_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GetChannel200Response]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_channels_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/channels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_emojis( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[EmojiResponse]: + """list_guild_emojis + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_emojis_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EmojiResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_emojis_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[EmojiResponse]]: + """list_guild_emojis + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_emojis_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EmojiResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_emojis_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_emojis + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_emojis_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EmojiResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_emojis_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/emojis', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_integrations( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListGuildIntegrations200ResponseInner]: + """list_guild_integrations + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_integrations_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildIntegrations200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_integrations_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListGuildIntegrations200ResponseInner]]: + """list_guild_integrations + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_integrations_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildIntegrations200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_integrations_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_integrations + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_integrations_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildIntegrations200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_integrations_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/integrations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_invites( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListChannelInvites200ResponseInner]: + """list_guild_invites + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_invites_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_invites_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListChannelInvites200ResponseInner]]: + """list_guild_invites + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_invites_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_invites_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_invites + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_invites_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListChannelInvites200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_invites_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_members( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildMemberResponse]: + """list_guild_members + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param after: + :type after: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_members_serialize( + guild_id=guild_id, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_members_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildMemberResponse]]: + """list_guild_members + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param after: + :type after: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_members_serialize( + guild_id=guild_id, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_members_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None, + after: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_members + + + :param guild_id: (required) + :type guild_id: str + :param limit: + :type limit: int + :param after: + :type after: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_members_serialize( + guild_id=guild_id, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_members_serialize( + self, + guild_id, + limit, + after, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if after is not None: + + _query_params.append(('after', after)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/members', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_roles( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildRoleResponse]: + """list_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_roles_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_roles_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildRoleResponse]]: + """list_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_roles_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_roles_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_roles + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_roles_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildRoleResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_roles_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/roles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_scheduled_event_users( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScheduledEventUserResponse]: + """list_guild_scheduled_event_users + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_event_users_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_member=with_member, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScheduledEventUserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_scheduled_event_users_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScheduledEventUserResponse]]: + """list_guild_scheduled_event_users + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_event_users_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_member=with_member, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScheduledEventUserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_scheduled_event_users_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_scheduled_event_users + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param before: + :type before: str + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_event_users_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + with_member=with_member, + limit=limit, + before=before, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScheduledEventUserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_scheduled_event_users_serialize( + self, + guild_id, + guild_scheduled_event_id, + with_member, + limit, + before, + after, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if guild_scheduled_event_id is not None: + _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id + # process the query parameters + if with_member is not None: + + _query_params.append(('with_member', with_member)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_scheduled_events( + self, + guild_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ListGuildScheduledEvents200ResponseInner]: + """list_guild_scheduled_events + + + :param guild_id: (required) + :type guild_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_events_serialize( + guild_id=guild_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildScheduledEvents200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_scheduled_events_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ListGuildScheduledEvents200ResponseInner]]: + """list_guild_scheduled_events + + + :param guild_id: (required) + :type guild_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_events_serialize( + guild_id=guild_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildScheduledEvents200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_scheduled_events_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + with_user_count: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_scheduled_events + + + :param guild_id: (required) + :type guild_id: str + :param with_user_count: + :type with_user_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_scheduled_events_serialize( + guild_id=guild_id, + with_user_count=with_user_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListGuildScheduledEvents200ResponseInner]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_scheduled_events_serialize( + self, + guild_id, + with_user_count, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if with_user_count is not None: + + _query_params.append(('with_user_count', with_user_count)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/scheduled-events', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_soundboard_sounds( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGuildSoundboardSoundsResponse: + """list_guild_soundboard_sounds + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_soundboard_sounds_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildSoundboardSoundsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_soundboard_sounds_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListGuildSoundboardSoundsResponse]: + """list_guild_soundboard_sounds + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_soundboard_sounds_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildSoundboardSoundsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_soundboard_sounds_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_soundboard_sounds + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_soundboard_sounds_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildSoundboardSoundsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_soundboard_sounds_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/soundboard-sounds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_stickers( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildStickerResponse]: + """list_guild_stickers + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_stickers_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildStickerResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_stickers_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildStickerResponse]]: + """list_guild_stickers + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_stickers_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildStickerResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_stickers_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_stickers + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_stickers_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildStickerResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_stickers_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/stickers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_templates( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildTemplateResponse]: + """list_guild_templates + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_templates_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildTemplateResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_templates_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildTemplateResponse]]: + """list_guild_templates + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_templates_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildTemplateResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_templates_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_templates + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_templates_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildTemplateResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_templates_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_guild_voice_regions( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[VoiceRegionResponse]: + """list_guild_voice_regions + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_voice_regions_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_guild_voice_regions_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[VoiceRegionResponse]]: + """list_guild_voice_regions + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_voice_regions_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_guild_voice_regions_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_guild_voice_regions + + + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_guild_voice_regions_serialize( + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_guild_voice_regions_serialize( + self, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/regions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_message_reactions_by_emoji( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + type: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserResponse]: + """list_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param after: + :type after: str + :param limit: + :type limit: int + :param type: + :type type: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + after=after, + limit=limit, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_message_reactions_by_emoji_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + type: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserResponse]]: + """list_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param after: + :type after: str + :param limit: + :type limit: int + :param type: + :type type: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + after=after, + limit=limit, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_message_reactions_by_emoji_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + emoji_name: Annotated[str, Field(strict=True, max_length=152133)], + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + type: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_message_reactions_by_emoji + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param emoji_name: (required) + :type emoji_name: str + :param after: + :type after: str + :param limit: + :type limit: int + :param type: + :type type: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_message_reactions_by_emoji_serialize( + channel_id=channel_id, + message_id=message_id, + emoji_name=emoji_name, + after=after, + limit=limit, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_message_reactions_by_emoji_serialize( + self, + channel_id, + message_id, + emoji_name, + after, + limit, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + if emoji_name is not None: + _path_params['emoji_name'] = emoji_name + # process the query parameters + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_messages( + self, + channel_id: Annotated[str, Field(strict=True)], + around: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MessageResponse]: + """list_messages + + + :param channel_id: (required) + :type channel_id: str + :param around: + :type around: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_messages_serialize( + channel_id=channel_id, + around=around, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_messages_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + around: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MessageResponse]]: + """list_messages + + + :param channel_id: (required) + :type channel_id: str + :param around: + :type around: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_messages_serialize( + channel_id=channel_id, + around=around, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_messages_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + around: Optional[Annotated[str, Field(strict=True)]] = None, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_messages + + + :param channel_id: (required) + :type channel_id: str + :param around: + :type around: str + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_messages_serialize( + channel_id=channel_id, + around=around, + before=before, + after=after, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MessageResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_messages_serialize( + self, + channel_id, + around, + before, + after, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if around is not None: + + _query_params.append(('around', around)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_my_connections( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ConnectedAccountResponse]: + """list_my_connections + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_connections_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ConnectedAccountResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_my_connections_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ConnectedAccountResponse]]: + """list_my_connections + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_connections_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ConnectedAccountResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_my_connections_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_my_connections + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_connections_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ConnectedAccountResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_my_connections_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/@me/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_my_guilds( + self, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MyGuildResponse]: + """list_my_guilds + + + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_guilds_serialize( + before=before, + after=after, + limit=limit, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyGuildResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_my_guilds_with_http_info( + self, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MyGuildResponse]]: + """list_my_guilds + + + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_guilds_serialize( + before=before, + after=after, + limit=limit, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyGuildResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_my_guilds_without_preload_content( + self, + before: Optional[Annotated[str, Field(strict=True)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, + with_counts: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_my_guilds + + + :param before: + :type before: str + :param after: + :type after: str + :param limit: + :type limit: int + :param with_counts: + :type with_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_guilds_serialize( + before=before, + after=after, + limit=limit, + with_counts=with_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyGuildResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_my_guilds_serialize( + self, + before, + after, + limit, + with_counts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if with_counts is not None: + + _query_params.append(('with_counts', with_counts)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/@me/guilds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_my_private_archived_threads( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadsResponse: + """list_my_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_my_private_archived_threads_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadsResponse]: + """list_my_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_my_private_archived_threads_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[Annotated[str, Field(strict=True)]] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_my_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: str + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_my_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_my_private_archived_threads_serialize( + self, + channel_id, + before, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if before is not None: + + _query_params.append(('before', before)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/users/@me/threads/archived/private', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_pins( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PinnedMessagesResponse: + """list_pins + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_pins_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PinnedMessagesResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_pins_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PinnedMessagesResponse]: + """list_pins + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_pins_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PinnedMessagesResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_pins_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_pins + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_pins_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PinnedMessagesResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_pins_serialize( + self, + channel_id, + before, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if before is not None: + if isinstance(before, datetime): + _query_params.append( + ( + 'before', + before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('before', before)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/messages/pins', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_private_archived_threads( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadsResponse: + """list_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_private_archived_threads_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadsResponse]: + """list_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_private_archived_threads_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_private_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_private_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_private_archived_threads_serialize( + self, + channel_id, + before, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if before is not None: + if isinstance(before, datetime): + _query_params.append( + ( + 'before', + before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('before', before)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/threads/archived/private', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_public_archived_threads( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadsResponse: + """list_public_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_public_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_public_archived_threads_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadsResponse]: + """list_public_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_public_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_public_archived_threads_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + before: Optional[datetime] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=2)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_public_archived_threads + + + :param channel_id: (required) + :type channel_id: str + :param before: + :type before: datetime + :param limit: + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_public_archived_threads_serialize( + channel_id=channel_id, + before=before, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_public_archived_threads_serialize( + self, + channel_id, + before, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if before is not None: + if isinstance(before, datetime): + _query_params.append( + ( + 'before', + before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('before', before)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/threads/archived/public', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_sticker_packs( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StickerPackCollectionResponse: + """list_sticker_packs + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sticker_packs_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackCollectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_sticker_packs_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StickerPackCollectionResponse]: + """list_sticker_packs + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sticker_packs_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackCollectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_sticker_packs_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_sticker_packs + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sticker_packs_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StickerPackCollectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_sticker_packs_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sticker-packs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_thread_members( + self, + channel_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ThreadMemberResponse]: + """list_thread_members + + + :param channel_id: (required) + :type channel_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_thread_members_serialize( + channel_id=channel_id, + with_member=with_member, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ThreadMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_thread_members_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ThreadMemberResponse]]: + """list_thread_members + + + :param channel_id: (required) + :type channel_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_thread_members_serialize( + channel_id=channel_id, + with_member=with_member, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ThreadMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_thread_members_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + with_member: Optional[StrictBool] = None, + limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, + after: Optional[Annotated[str, Field(strict=True)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_thread_members + + + :param channel_id: (required) + :type channel_id: str + :param with_member: + :type with_member: bool + :param limit: + :type limit: int + :param after: + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_thread_members_serialize( + channel_id=channel_id, + with_member=with_member, + limit=limit, + after=after, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ThreadMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_thread_members_serialize( + self, + channel_id, + with_member, + limit, + after, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if with_member is not None: + + _query_params.append(('with_member', with_member)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if after is not None: + + _query_params.append(('after', after)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/thread-members', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_voice_regions( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[VoiceRegionResponse]: + """list_voice_regions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_voice_regions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_voice_regions_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[VoiceRegionResponse]]: + """list_voice_regions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_voice_regions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_voice_regions_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_voice_regions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_voice_regions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[VoiceRegionResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_voice_regions_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/voice/regions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def partner_sdk_token( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProvisionalTokenResponse: + """partner_sdk_token + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_token_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProvisionalTokenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def partner_sdk_token_with_http_info( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProvisionalTokenResponse]: + """partner_sdk_token + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_token_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProvisionalTokenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def partner_sdk_token_without_preload_content( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """partner_sdk_token + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_token_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProvisionalTokenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _partner_sdk_token_serialize( + self, + partner_sdk_unmerge_provisional_account_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if partner_sdk_unmerge_provisional_account_request is not None: + _body_params = partner_sdk_unmerge_provisional_account_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/partner-sdk/token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def partner_sdk_unmerge_provisional_account( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """partner_sdk_unmerge_provisional_account + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_unmerge_provisional_account_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def partner_sdk_unmerge_provisional_account_with_http_info( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """partner_sdk_unmerge_provisional_account + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_unmerge_provisional_account_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def partner_sdk_unmerge_provisional_account_without_preload_content( + self, + partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """partner_sdk_unmerge_provisional_account + + + :param partner_sdk_unmerge_provisional_account_request: (required) + :type partner_sdk_unmerge_provisional_account_request: PartnerSdkUnmergeProvisionalAccountRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._partner_sdk_unmerge_provisional_account_serialize( + partner_sdk_unmerge_provisional_account_request=partner_sdk_unmerge_provisional_account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _partner_sdk_unmerge_provisional_account_serialize( + self, + partner_sdk_unmerge_provisional_account_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if partner_sdk_unmerge_provisional_account_request is not None: + _body_params = partner_sdk_unmerge_provisional_account_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/partner-sdk/provisional-accounts/unmerge', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def poll_expire( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """poll_expire + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._poll_expire_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def poll_expire_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """poll_expire + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._poll_expire_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def poll_expire_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """poll_expire + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._poll_expire_serialize( + channel_id=channel_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _poll_expire_serialize( + self, + channel_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/polls/{message_id}/expire', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def preview_prune_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None, + include_roles: Optional[Any] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildPruneResponse: + """preview_prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param days: + :type days: int + :param include_roles: + :type include_roles: GetEntitlementsSkuIdsParameter + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._preview_prune_guild_serialize( + guild_id=guild_id, + days=days, + include_roles=include_roles, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def preview_prune_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None, + include_roles: Optional[Any] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildPruneResponse]: + """preview_prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param days: + :type days: int + :param include_roles: + :type include_roles: GetEntitlementsSkuIdsParameter + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._preview_prune_guild_serialize( + guild_id=guild_id, + days=days, + include_roles=include_roles, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def preview_prune_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None, + include_roles: Optional[Any] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """preview_prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param days: + :type days: int + :param include_roles: + :type include_roles: GetEntitlementsSkuIdsParameter + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._preview_prune_guild_serialize( + guild_id=guild_id, + days=days, + include_roles=include_roles, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _preview_prune_guild_serialize( + self, + guild_id, + days, + include_roles, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if days is not None: + + _query_params.append(('days', days)) + + if include_roles is not None: + + _query_params.append(('include_roles', include_roles)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/prune', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def prune_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + prune_guild_request: PruneGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildPruneResponse: + """prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param prune_guild_request: (required) + :type prune_guild_request: PruneGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._prune_guild_serialize( + guild_id=guild_id, + prune_guild_request=prune_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def prune_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + prune_guild_request: PruneGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildPruneResponse]: + """prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param prune_guild_request: (required) + :type prune_guild_request: PruneGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._prune_guild_serialize( + guild_id=guild_id, + prune_guild_request=prune_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def prune_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + prune_guild_request: PruneGuildRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """prune_guild + + + :param guild_id: (required) + :type guild_id: str + :param prune_guild_request: (required) + :type prune_guild_request: PruneGuildRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._prune_guild_serialize( + guild_id=guild_id, + prune_guild_request=prune_guild_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildPruneResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _prune_guild_serialize( + self, + guild_id, + prune_guild_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if prune_guild_request is not None: + _body_params = prune_guild_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/prune', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def put_guilds_onboarding( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_onboarding_request: UpdateGuildOnboardingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildOnboardingResponse: + """put_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_onboarding_request: (required) + :type update_guild_onboarding_request: UpdateGuildOnboardingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_guilds_onboarding_serialize( + guild_id=guild_id, + update_guild_onboarding_request=update_guild_onboarding_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def put_guilds_onboarding_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_onboarding_request: UpdateGuildOnboardingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildOnboardingResponse]: + """put_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_onboarding_request: (required) + :type update_guild_onboarding_request: UpdateGuildOnboardingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_guilds_onboarding_serialize( + guild_id=guild_id, + update_guild_onboarding_request=update_guild_onboarding_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def put_guilds_onboarding_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_onboarding_request: UpdateGuildOnboardingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """put_guilds_onboarding + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_onboarding_request: (required) + :type update_guild_onboarding_request: UpdateGuildOnboardingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_guilds_onboarding_serialize( + guild_id=guild_id, + update_guild_onboarding_request=update_guild_onboarding_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildOnboardingResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _put_guilds_onboarding_serialize( + self, + guild_id, + update_guild_onboarding_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_onboarding_request is not None: + _body_params = update_guild_onboarding_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/guilds/{guild_id}/onboarding', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def search_guild_members( + self, + limit: Annotated[int, Field(le=1000, strict=True, ge=1)], + query: Annotated[str, Field(min_length=1, strict=True, max_length=100)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GuildMemberResponse]: + """search_guild_members + + + :param limit: (required) + :type limit: int + :param query: (required) + :type query: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_guild_members_serialize( + limit=limit, + query=query, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def search_guild_members_with_http_info( + self, + limit: Annotated[int, Field(le=1000, strict=True, ge=1)], + query: Annotated[str, Field(min_length=1, strict=True, max_length=100)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GuildMemberResponse]]: + """search_guild_members + + + :param limit: (required) + :type limit: int + :param query: (required) + :type query: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_guild_members_serialize( + limit=limit, + query=query, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def search_guild_members_without_preload_content( + self, + limit: Annotated[int, Field(le=1000, strict=True, ge=1)], + query: Annotated[str, Field(min_length=1, strict=True, max_length=100)], + guild_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """search_guild_members + + + :param limit: (required) + :type limit: int + :param query: (required) + :type query: str + :param guild_id: (required) + :type guild_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_guild_members_serialize( + limit=limit, + query=query, + guild_id=guild_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GuildMemberResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_guild_members_serialize( + self, + limit, + query, + guild_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if query is not None: + + _query_params.append(('query', query)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/guilds/{guild_id}/members/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def send_soundboard_sound( + self, + channel_id: Annotated[str, Field(strict=True)], + soundboard_sound_send_request: SoundboardSoundSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """send_soundboard_sound + + + :param channel_id: (required) + :type channel_id: str + :param soundboard_sound_send_request: (required) + :type soundboard_sound_send_request: SoundboardSoundSendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_soundboard_sound_serialize( + channel_id=channel_id, + soundboard_sound_send_request=soundboard_sound_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def send_soundboard_sound_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + soundboard_sound_send_request: SoundboardSoundSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """send_soundboard_sound + + + :param channel_id: (required) + :type channel_id: str + :param soundboard_sound_send_request: (required) + :type soundboard_sound_send_request: SoundboardSoundSendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_soundboard_sound_serialize( + channel_id=channel_id, + soundboard_sound_send_request=soundboard_sound_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def send_soundboard_sound_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + soundboard_sound_send_request: SoundboardSoundSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """send_soundboard_sound + + + :param channel_id: (required) + :type channel_id: str + :param soundboard_sound_send_request: (required) + :type soundboard_sound_send_request: SoundboardSoundSendRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_soundboard_sound_serialize( + channel_id=channel_id, + soundboard_sound_send_request=soundboard_sound_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_soundboard_sound_serialize( + self, + channel_id, + soundboard_sound_send_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if soundboard_sound_send_request is not None: + _body_params = soundboard_sound_send_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/send-soundboard-sound', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def set_channel_permission_overwrite( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """set_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param set_channel_permission_overwrite_request: (required) + :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + set_channel_permission_overwrite_request=set_channel_permission_overwrite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def set_channel_permission_overwrite_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """set_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param set_channel_permission_overwrite_request: (required) + :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + set_channel_permission_overwrite_request=set_channel_permission_overwrite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def set_channel_permission_overwrite_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + overwrite_id: Annotated[str, Field(strict=True)], + set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """set_channel_permission_overwrite + + + :param channel_id: (required) + :type channel_id: str + :param overwrite_id: (required) + :type overwrite_id: str + :param set_channel_permission_overwrite_request: (required) + :type set_channel_permission_overwrite_request: SetChannelPermissionOverwriteRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_channel_permission_overwrite_serialize( + channel_id=channel_id, + overwrite_id=overwrite_id, + set_channel_permission_overwrite_request=set_channel_permission_overwrite_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_channel_permission_overwrite_serialize( + self, + channel_id, + overwrite_id, + set_channel_permission_overwrite_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if overwrite_id is not None: + _path_params['overwrite_id'] = overwrite_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_channel_permission_overwrite_request is not None: + _body_params = set_channel_permission_overwrite_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/channels/{channel_id}/permissions/{overwrite_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def set_guild_application_command_permissions( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CommandPermissionsResponse: + """set_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param set_guild_application_command_permissions_request: (required) + :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + set_guild_application_command_permissions_request=set_guild_application_command_permissions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def set_guild_application_command_permissions_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CommandPermissionsResponse]: + """set_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param set_guild_application_command_permissions_request: (required) + :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + set_guild_application_command_permissions_request=set_guild_application_command_permissions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def set_guild_application_command_permissions_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """set_guild_application_command_permissions + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param set_guild_application_command_permissions_request: (required) + :type set_guild_application_command_permissions_request: SetGuildApplicationCommandPermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_application_command_permissions_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + set_guild_application_command_permissions_request=set_guild_application_command_permissions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CommandPermissionsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_guild_application_command_permissions_serialize( + self, + application_id, + guild_id, + command_id, + set_guild_application_command_permissions_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_guild_application_command_permissions_request is not None: + _body_params = set_guild_application_command_permissions_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def set_guild_mfa_level( + self, + guild_id: Annotated[str, Field(strict=True)], + set_guild_mfa_level_request: SetGuildMfaLevelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildMFALevelResponse: + """set_guild_mfa_level + + + :param guild_id: (required) + :type guild_id: str + :param set_guild_mfa_level_request: (required) + :type set_guild_mfa_level_request: SetGuildMfaLevelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_mfa_level_serialize( + guild_id=guild_id, + set_guild_mfa_level_request=set_guild_mfa_level_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMFALevelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def set_guild_mfa_level_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + set_guild_mfa_level_request: SetGuildMfaLevelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildMFALevelResponse]: + """set_guild_mfa_level + + + :param guild_id: (required) + :type guild_id: str + :param set_guild_mfa_level_request: (required) + :type set_guild_mfa_level_request: SetGuildMfaLevelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_mfa_level_serialize( + guild_id=guild_id, + set_guild_mfa_level_request=set_guild_mfa_level_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMFALevelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def set_guild_mfa_level_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + set_guild_mfa_level_request: SetGuildMfaLevelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """set_guild_mfa_level + + + :param guild_id: (required) + :type guild_id: str + :param set_guild_mfa_level_request: (required) + :type set_guild_mfa_level_request: SetGuildMfaLevelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_guild_mfa_level_serialize( + guild_id=guild_id, + set_guild_mfa_level_request=set_guild_mfa_level_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMFALevelResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_guild_mfa_level_serialize( + self, + guild_id, + set_guild_mfa_level_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_guild_mfa_level_request is not None: + _body_params = set_guild_mfa_level_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/guilds/{guild_id}/mfa', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def sync_guild_template( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildTemplateResponse: + """sync_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sync_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def sync_guild_template_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildTemplateResponse]: + """sync_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sync_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def sync_guild_template_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """sync_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sync_guild_template_serialize( + guild_id=guild_id, + code=code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sync_guild_template_serialize( + self, + guild_id, + code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/guilds/{guild_id}/templates/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def thread_search( + self, + channel_id: Annotated[str, Field(strict=True)], + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None, + min_id: Optional[Annotated[str, Field(strict=True)]] = None, + max_id: Optional[Annotated[str, Field(strict=True)]] = None, + tag: Optional[Any] = None, + tag_setting: Optional[StrictStr] = None, + archived: Optional[StrictBool] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None, + offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ThreadSearchResponse: + """thread_search + + + :param channel_id: (required) + :type channel_id: str + :param name: + :type name: str + :param slop: + :type slop: int + :param min_id: + :type min_id: str + :param max_id: + :type max_id: str + :param tag: + :type tag: ThreadSearchTagParameter + :param tag_setting: + :type tag_setting: str + :param archived: + :type archived: bool + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._thread_search_serialize( + channel_id=channel_id, + name=name, + slop=slop, + min_id=min_id, + max_id=max_id, + tag=tag, + tag_setting=tag_setting, + archived=archived, + sort_by=sort_by, + sort_order=sort_order, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadSearchResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def thread_search_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None, + min_id: Optional[Annotated[str, Field(strict=True)]] = None, + max_id: Optional[Annotated[str, Field(strict=True)]] = None, + tag: Optional[Any] = None, + tag_setting: Optional[StrictStr] = None, + archived: Optional[StrictBool] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None, + offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ThreadSearchResponse]: + """thread_search + + + :param channel_id: (required) + :type channel_id: str + :param name: + :type name: str + :param slop: + :type slop: int + :param min_id: + :type min_id: str + :param max_id: + :type max_id: str + :param tag: + :type tag: ThreadSearchTagParameter + :param tag_setting: + :type tag_setting: str + :param archived: + :type archived: bool + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._thread_search_serialize( + channel_id=channel_id, + name=name, + slop=slop, + min_id=min_id, + max_id=max_id, + tag=tag, + tag_setting=tag_setting, + archived=archived, + sort_by=sort_by, + sort_order=sort_order, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadSearchResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def thread_search_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None, + slop: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None, + min_id: Optional[Annotated[str, Field(strict=True)]] = None, + max_id: Optional[Annotated[str, Field(strict=True)]] = None, + tag: Optional[Any] = None, + tag_setting: Optional[StrictStr] = None, + archived: Optional[StrictBool] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + limit: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None, + offset: Optional[Annotated[int, Field(le=9975, strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """thread_search + + + :param channel_id: (required) + :type channel_id: str + :param name: + :type name: str + :param slop: + :type slop: int + :param min_id: + :type min_id: str + :param max_id: + :type max_id: str + :param tag: + :type tag: ThreadSearchTagParameter + :param tag_setting: + :type tag_setting: str + :param archived: + :type archived: bool + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._thread_search_serialize( + channel_id=channel_id, + name=name, + slop=slop, + min_id=min_id, + max_id=max_id, + tag=tag, + tag_setting=tag_setting, + archived=archived, + sort_by=sort_by, + sort_order=sort_order, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ThreadSearchResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _thread_search_serialize( + self, + channel_id, + name, + slop, + min_id, + max_id, + tag, + tag_setting, + archived, + sort_by, + sort_order, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + if name is not None: + + _query_params.append(('name', name)) + + if slop is not None: + + _query_params.append(('slop', slop)) + + if min_id is not None: + + _query_params.append(('min_id', min_id)) + + if max_id is not None: + + _query_params.append(('max_id', max_id)) + + if tag is not None: + + _query_params.append(('tag', tag)) + + if tag_setting is not None: + + _query_params.append(('tag_setting', tag_setting)) + + if archived is not None: + + _query_params.append(('archived', archived)) + + if sort_by is not None: + + _query_params.append(('sort_by', sort_by)) + + if sort_order is not None: + + _query_params.append(('sort_order', sort_order)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/channels/{channel_id}/threads/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def trigger_typing_indicator( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """trigger_typing_indicator + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_typing_indicator_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def trigger_typing_indicator_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """trigger_typing_indicator + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_typing_indicator_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def trigger_typing_indicator_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """trigger_typing_indicator + + + :param channel_id: (required) + :type channel_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_typing_indicator_serialize( + channel_id=channel_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _trigger_typing_indicator_serialize( + self, + channel_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/channels/{channel_id}/typing', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def unban_user_from_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """unban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def unban_user_from_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """unban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def unban_user_from_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """unban_user_from_guild + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unban_user_from_guild_serialize( + guild_id=guild_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unban_user_from_guild_serialize( + self, + guild_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/guilds/{guild_id}/bans/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_application( + self, + application_id: Annotated[str, Field(strict=True)], + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateApplicationResponse: + """update_application + + + :param application_id: (required) + :type application_id: str + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_serialize( + application_id=application_id, + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_application_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateApplicationResponse]: + """update_application + + + :param application_id: (required) + :type application_id: str + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_serialize( + application_id=application_id, + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_application_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_application + + + :param application_id: (required) + :type application_id: str + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_serialize( + application_id=application_id, + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_application_serialize( + self, + application_id, + application_form_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_form_partial is not None: + _body_params = application_form_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/applications/{application_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """update_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_command_serialize( + application_id=application_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """update_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_command_serialize( + application_id=application_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_application_command + + + :param application_id: (required) + :type application_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_command_serialize( + application_id=application_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_application_command_serialize( + self, + application_id, + command_id, + application_command_patch_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_patch_request_partial is not None: + _body_params = application_command_patch_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/applications/{application_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_application_emoji( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_application_emoji_request: UpdateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """update_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_application_emoji_request: (required) + :type update_application_emoji_request: UpdateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + update_application_emoji_request=update_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_application_emoji_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_application_emoji_request: UpdateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """update_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_application_emoji_request: (required) + :type update_application_emoji_request: UpdateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + update_application_emoji_request=update_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_application_emoji_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_application_emoji_request: UpdateApplicationEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_application_emoji + + + :param application_id: (required) + :type application_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_application_emoji_request: (required) + :type update_application_emoji_request: UpdateApplicationEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_emoji_serialize( + application_id=application_id, + emoji_id=emoji_id, + update_application_emoji_request=update_application_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_application_emoji_serialize( + self, + application_id, + emoji_id, + update_application_emoji_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_application_emoji_request is not None: + _body_params = update_application_emoji_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/applications/{application_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_application_role_connections_metadata( + self, + application_id: Annotated[str, Field(strict=True)], + application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApplicationRoleConnectionsMetadataItemResponse]: + """update_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param application_role_connections_metadata_item_request: (required) + :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_role_connections_metadata_serialize( + application_id=application_id, + application_role_connections_metadata_item_request=application_role_connections_metadata_item_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_application_role_connections_metadata_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApplicationRoleConnectionsMetadataItemResponse]]: + """update_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param application_role_connections_metadata_item_request: (required) + :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_role_connections_metadata_serialize( + application_id=application_id, + application_role_connections_metadata_item_request=application_role_connections_metadata_item_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_application_role_connections_metadata_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + application_role_connections_metadata_item_request: Optional[Annotated[List[ApplicationRoleConnectionsMetadataItemRequest], Field(max_length=5)]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_application_role_connections_metadata + + + :param application_id: (required) + :type application_id: str + :param application_role_connections_metadata_item_request: (required) + :type application_role_connections_metadata_item_request: List[ApplicationRoleConnectionsMetadataItemRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_role_connections_metadata_serialize( + application_id=application_id, + application_role_connections_metadata_item_request=application_role_connections_metadata_item_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApplicationRoleConnectionsMetadataItemResponse]", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_application_role_connections_metadata_serialize( + self, + application_id, + application_role_connections_metadata_item_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'ApplicationRoleConnectionsMetadataItemRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_role_connections_metadata_item_request is not None: + _body_params = application_role_connections_metadata_item_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/applications/{application_id}/role-connections/metadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_application_user_role_connection( + self, + application_id: Annotated[str, Field(strict=True)], + update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationUserRoleConnectionResponse: + """update_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param update_application_user_role_connection_request: (required) + :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_user_role_connection_serialize( + application_id=application_id, + update_application_user_role_connection_request=update_application_user_role_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_application_user_role_connection_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationUserRoleConnectionResponse]: + """update_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param update_application_user_role_connection_request: (required) + :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_user_role_connection_serialize( + application_id=application_id, + update_application_user_role_connection_request=update_application_user_role_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_application_user_role_connection_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_application_user_role_connection + + + :param application_id: (required) + :type application_id: str + :param update_application_user_role_connection_request: (required) + :type update_application_user_role_connection_request: UpdateApplicationUserRoleConnectionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_user_role_connection_serialize( + application_id=application_id, + update_application_user_role_connection_request=update_application_user_role_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationUserRoleConnectionResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_application_user_role_connection_serialize( + self, + application_id, + update_application_user_role_connection_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_application_user_role_connection_request is not None: + _body_params = update_application_user_role_connection_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/users/@me/applications/{application_id}/role-connection', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_auto_moderation_rule( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateAutoModerationRule200Response: + """update_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param update_auto_moderation_rule_request: (required) + :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + update_auto_moderation_rule_request=update_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_auto_moderation_rule_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateAutoModerationRule200Response]: + """update_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param update_auto_moderation_rule_request: (required) + :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + update_auto_moderation_rule_request=update_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_auto_moderation_rule_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + rule_id: Annotated[str, Field(strict=True)], + update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_auto_moderation_rule + + + :param guild_id: (required) + :type guild_id: str + :param rule_id: (required) + :type rule_id: str + :param update_auto_moderation_rule_request: (required) + :type update_auto_moderation_rule_request: UpdateAutoModerationRuleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_auto_moderation_rule_serialize( + guild_id=guild_id, + rule_id=rule_id, + update_auto_moderation_rule_request=update_auto_moderation_rule_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateAutoModerationRule200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_auto_moderation_rule_serialize( + self, + guild_id, + rule_id, + update_auto_moderation_rule_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if rule_id is not None: + _path_params['rule_id'] = rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_auto_moderation_rule_request is not None: + _body_params = update_auto_moderation_rule_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/auto-moderation/rules/{rule_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_channel( + self, + channel_id: Annotated[str, Field(strict=True)], + update_channel_request: UpdateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetChannel200Response: + """update_channel + + + :param channel_id: (required) + :type channel_id: str + :param update_channel_request: (required) + :type update_channel_request: UpdateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_channel_serialize( + channel_id=channel_id, + update_channel_request=update_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_channel_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + update_channel_request: UpdateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetChannel200Response]: + """update_channel + + + :param channel_id: (required) + :type channel_id: str + :param update_channel_request: (required) + :type update_channel_request: UpdateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_channel_serialize( + channel_id=channel_id, + update_channel_request=update_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_channel_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + update_channel_request: UpdateChannelRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_channel + + + :param channel_id: (required) + :type channel_id: str + :param update_channel_request: (required) + :type update_channel_request: UpdateChannelRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_channel_serialize( + channel_id=channel_id, + update_channel_request=update_channel_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetChannel200Response", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_channel_serialize( + self, + channel_id, + update_channel_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_channel_request is not None: + _body_params = update_channel_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/channels/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_patch_request_partial: GuildPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildResponse: + """update_guild + + + :param guild_id: (required) + :type guild_id: str + :param guild_patch_request_partial: (required) + :type guild_patch_request_partial: GuildPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_serialize( + guild_id=guild_id, + guild_patch_request_partial=guild_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_patch_request_partial: GuildPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildResponse]: + """update_guild + + + :param guild_id: (required) + :type guild_id: str + :param guild_patch_request_partial: (required) + :type guild_patch_request_partial: GuildPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_serialize( + guild_id=guild_id, + guild_patch_request_partial=guild_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_patch_request_partial: GuildPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild + + + :param guild_id: (required) + :type guild_id: str + :param guild_patch_request_partial: (required) + :type guild_patch_request_partial: GuildPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_serialize( + guild_id=guild_id, + guild_patch_request_partial=guild_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_serialize( + self, + guild_id, + guild_patch_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if guild_patch_request_partial is not None: + _body_params = guild_patch_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_application_command( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationCommandResponse: + """update_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_application_command_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationCommandResponse]: + """update_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_application_command_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + guild_id: Annotated[str, Field(strict=True)], + command_id: Annotated[str, Field(strict=True)], + application_command_patch_request_partial: ApplicationCommandPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_application_command + + + :param application_id: (required) + :type application_id: str + :param guild_id: (required) + :type guild_id: str + :param command_id: (required) + :type command_id: str + :param application_command_patch_request_partial: (required) + :type application_command_patch_request_partial: ApplicationCommandPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_application_command_serialize( + application_id=application_id, + guild_id=guild_id, + command_id=command_id, + application_command_patch_request_partial=application_command_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplicationCommandResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_application_command_serialize( + self, + application_id, + guild_id, + command_id, + application_command_patch_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + if guild_id is not None: + _path_params['guild_id'] = guild_id + if command_id is not None: + _path_params['command_id'] = command_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_command_patch_request_partial is not None: + _body_params = application_command_patch_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/applications/{application_id}/guilds/{guild_id}/commands/{command_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_emoji( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_guild_emoji_request: UpdateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmojiResponse: + """update_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_guild_emoji_request: (required) + :type update_guild_emoji_request: UpdateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + update_guild_emoji_request=update_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_emoji_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_guild_emoji_request: UpdateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmojiResponse]: + """update_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_guild_emoji_request: (required) + :type update_guild_emoji_request: UpdateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + update_guild_emoji_request=update_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_emoji_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + emoji_id: Annotated[str, Field(strict=True)], + update_guild_emoji_request: UpdateGuildEmojiRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_emoji + + + :param guild_id: (required) + :type guild_id: str + :param emoji_id: (required) + :type emoji_id: str + :param update_guild_emoji_request: (required) + :type update_guild_emoji_request: UpdateGuildEmojiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_emoji_serialize( + guild_id=guild_id, + emoji_id=emoji_id, + update_guild_emoji_request=update_guild_emoji_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmojiResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_emoji_serialize( + self, + guild_id, + emoji_id, + update_guild_emoji_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if emoji_id is not None: + _path_params['emoji_id'] = emoji_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_emoji_request is not None: + _body_params = update_guild_emoji_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/emojis/{emoji_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_guild_member_request: UpdateGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildMemberResponse: + """update_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_guild_member_request: (required) + :type update_guild_member_request: UpdateGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + update_guild_member_request=update_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_guild_member_request: UpdateGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildMemberResponse]: + """update_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_guild_member_request: (required) + :type update_guild_member_request: UpdateGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + update_guild_member_request=update_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_guild_member_request: UpdateGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_guild_member_request: (required) + :type update_guild_member_request: UpdateGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_member_serialize( + guild_id=guild_id, + user_id=user_id, + update_guild_member_request=update_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildMemberResponse", + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_member_serialize( + self, + guild_id, + user_id, + update_guild_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_member_request is not None: + _body_params = update_guild_member_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/members/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_role( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildRoleResponse: + """update_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_role_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildRoleResponse]: + """update_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_role_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + role_id: Annotated[str, Field(strict=True)], + create_guild_role_request: CreateGuildRoleRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_role + + + :param guild_id: (required) + :type guild_id: str + :param role_id: (required) + :type role_id: str + :param create_guild_role_request: (required) + :type create_guild_role_request: CreateGuildRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_role_serialize( + guild_id=guild_id, + role_id=role_id, + create_guild_role_request=create_guild_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildRoleResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_role_serialize( + self, + guild_id, + role_id, + create_guild_role_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if role_id is not None: + _path_params['role_id'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_guild_role_request is not None: + _body_params = create_guild_role_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/roles/{role_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_scheduled_event( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListGuildScheduledEvents200ResponseInner: + """update_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param update_guild_scheduled_event_request: (required) + :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + update_guild_scheduled_event_request=update_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_scheduled_event_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListGuildScheduledEvents200ResponseInner]: + """update_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param update_guild_scheduled_event_request: (required) + :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + update_guild_scheduled_event_request=update_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_scheduled_event_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + guild_scheduled_event_id: Annotated[str, Field(strict=True)], + update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_scheduled_event + + + :param guild_id: (required) + :type guild_id: str + :param guild_scheduled_event_id: (required) + :type guild_scheduled_event_id: str + :param update_guild_scheduled_event_request: (required) + :type update_guild_scheduled_event_request: UpdateGuildScheduledEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_scheduled_event_serialize( + guild_id=guild_id, + guild_scheduled_event_id=guild_scheduled_event_id, + update_guild_scheduled_event_request=update_guild_scheduled_event_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListGuildScheduledEvents200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_scheduled_event_serialize( + self, + guild_id, + guild_scheduled_event_id, + update_guild_scheduled_event_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if guild_scheduled_event_id is not None: + _path_params['guild_scheduled_event_id'] = guild_scheduled_event_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_scheduled_event_request is not None: + _body_params = update_guild_scheduled_event_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_soundboard_sound( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + soundboard_patch_request_partial: SoundboardPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SoundboardSoundResponse: + """update_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param soundboard_patch_request_partial: (required) + :type soundboard_patch_request_partial: SoundboardPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + soundboard_patch_request_partial=soundboard_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_soundboard_sound_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + soundboard_patch_request_partial: SoundboardPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SoundboardSoundResponse]: + """update_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param soundboard_patch_request_partial: (required) + :type soundboard_patch_request_partial: SoundboardPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + soundboard_patch_request_partial=soundboard_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_soundboard_sound_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sound_id: Annotated[str, Field(strict=True)], + soundboard_patch_request_partial: SoundboardPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_soundboard_sound + + + :param guild_id: (required) + :type guild_id: str + :param sound_id: (required) + :type sound_id: str + :param soundboard_patch_request_partial: (required) + :type soundboard_patch_request_partial: SoundboardPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_soundboard_sound_serialize( + guild_id=guild_id, + sound_id=sound_id, + soundboard_patch_request_partial=soundboard_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SoundboardSoundResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_soundboard_sound_serialize( + self, + guild_id, + sound_id, + soundboard_patch_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sound_id is not None: + _path_params['sound_id'] = sound_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if soundboard_patch_request_partial is not None: + _body_params = soundboard_patch_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/soundboard-sounds/{sound_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_sticker( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + update_guild_sticker_request: UpdateGuildStickerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildStickerResponse: + """update_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param update_guild_sticker_request: (required) + :type update_guild_sticker_request: UpdateGuildStickerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + update_guild_sticker_request=update_guild_sticker_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_sticker_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + update_guild_sticker_request: UpdateGuildStickerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildStickerResponse]: + """update_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param update_guild_sticker_request: (required) + :type update_guild_sticker_request: UpdateGuildStickerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + update_guild_sticker_request=update_guild_sticker_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_sticker_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + sticker_id: Annotated[str, Field(strict=True)], + update_guild_sticker_request: UpdateGuildStickerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_sticker + + + :param guild_id: (required) + :type guild_id: str + :param sticker_id: (required) + :type sticker_id: str + :param update_guild_sticker_request: (required) + :type update_guild_sticker_request: UpdateGuildStickerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_sticker_serialize( + guild_id=guild_id, + sticker_id=sticker_id, + update_guild_sticker_request=update_guild_sticker_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildStickerResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_sticker_serialize( + self, + guild_id, + sticker_id, + update_guild_sticker_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if sticker_id is not None: + _path_params['sticker_id'] = sticker_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_sticker_request is not None: + _body_params = update_guild_sticker_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/stickers/{sticker_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_template( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + update_guild_template_request: UpdateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildTemplateResponse: + """update_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param update_guild_template_request: (required) + :type update_guild_template_request: UpdateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_template_serialize( + guild_id=guild_id, + code=code, + update_guild_template_request=update_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_template_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + update_guild_template_request: UpdateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildTemplateResponse]: + """update_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param update_guild_template_request: (required) + :type update_guild_template_request: UpdateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_template_serialize( + guild_id=guild_id, + code=code, + update_guild_template_request=update_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_template_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + code: Annotated[str, Field(strict=True, max_length=152133)], + update_guild_template_request: UpdateGuildTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_template + + + :param guild_id: (required) + :type guild_id: str + :param code: (required) + :type code: str + :param update_guild_template_request: (required) + :type update_guild_template_request: UpdateGuildTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_template_serialize( + guild_id=guild_id, + code=code, + update_guild_template_request=update_guild_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildTemplateResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_template_serialize( + self, + guild_id, + code, + update_guild_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if code is not None: + _path_params['code'] = code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_template_request is not None: + _body_params = update_guild_template_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/templates/{code}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_welcome_screen( + self, + guild_id: Annotated[str, Field(strict=True)], + welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GuildWelcomeScreenResponse: + """update_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param welcome_screen_patch_request_partial: (required) + :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_welcome_screen_serialize( + guild_id=guild_id, + welcome_screen_patch_request_partial=welcome_screen_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_welcome_screen_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GuildWelcomeScreenResponse]: + """update_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param welcome_screen_patch_request_partial: (required) + :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_welcome_screen_serialize( + guild_id=guild_id, + welcome_screen_patch_request_partial=welcome_screen_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_welcome_screen_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_welcome_screen + + + :param guild_id: (required) + :type guild_id: str + :param welcome_screen_patch_request_partial: (required) + :type welcome_screen_patch_request_partial: WelcomeScreenPatchRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_welcome_screen_serialize( + guild_id=guild_id, + welcome_screen_patch_request_partial=welcome_screen_patch_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GuildWelcomeScreenResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_welcome_screen_serialize( + self, + guild_id, + welcome_screen_patch_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if welcome_screen_patch_request_partial is not None: + _body_params = welcome_screen_patch_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/welcome-screen', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_guild_widget_settings( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WidgetSettingsResponse: + """update_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_widget_settings_request: (required) + :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_widget_settings_serialize( + guild_id=guild_id, + update_guild_widget_settings_request=update_guild_widget_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_guild_widget_settings_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WidgetSettingsResponse]: + """update_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_widget_settings_request: (required) + :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_widget_settings_serialize( + guild_id=guild_id, + update_guild_widget_settings_request=update_guild_widget_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_guild_widget_settings_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_guild_widget_settings + + + :param guild_id: (required) + :type guild_id: str + :param update_guild_widget_settings_request: (required) + :type update_guild_widget_settings_request: UpdateGuildWidgetSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_guild_widget_settings_serialize( + guild_id=guild_id, + update_guild_widget_settings_request=update_guild_widget_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WidgetSettingsResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_guild_widget_settings_serialize( + self, + guild_id, + update_guild_widget_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_guild_widget_settings_request is not None: + _body_params = update_guild_widget_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/widget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_message( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + message_edit_request_partial: MessageEditRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """update_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param message_edit_request_partial: (required) + :type message_edit_request_partial: MessageEditRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_message_serialize( + channel_id=channel_id, + message_id=message_id, + message_edit_request_partial=message_edit_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_message_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + message_edit_request_partial: MessageEditRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """update_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param message_edit_request_partial: (required) + :type message_edit_request_partial: MessageEditRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_message_serialize( + channel_id=channel_id, + message_id=message_id, + message_edit_request_partial=message_edit_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_message_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + message_id: Annotated[str, Field(strict=True)], + message_edit_request_partial: MessageEditRequestPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_message + + + :param channel_id: (required) + :type channel_id: str + :param message_id: (required) + :type message_id: str + :param message_edit_request_partial: (required) + :type message_edit_request_partial: MessageEditRequestPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_message_serialize( + channel_id=channel_id, + message_id=message_id, + message_edit_request_partial=message_edit_request_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_message_serialize( + self, + channel_id, + message_id, + message_edit_request_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if message_edit_request_partial is not None: + _body_params = message_edit_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/channels/{channel_id}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_my_application( + self, + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateApplicationResponse: + """update_my_application + + + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_application_serialize( + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_my_application_with_http_info( + self, + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateApplicationResponse]: + """update_my_application + + + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_application_serialize( + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_my_application_without_preload_content( + self, + application_form_partial: ApplicationFormPartial, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_my_application + + + :param application_form_partial: (required) + :type application_form_partial: ApplicationFormPartial + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_application_serialize( + application_form_partial=application_form_partial, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateApplicationResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_my_application_serialize( + self, + application_form_partial, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_form_partial is not None: + _body_params = application_form_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/applications/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_my_guild_member( + self, + guild_id: Annotated[str, Field(strict=True)], + update_my_guild_member_request: UpdateMyGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PrivateGuildMemberResponse: + """update_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param update_my_guild_member_request: (required) + :type update_my_guild_member_request: UpdateMyGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_guild_member_serialize( + guild_id=guild_id, + update_my_guild_member_request=update_my_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_my_guild_member_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + update_my_guild_member_request: UpdateMyGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PrivateGuildMemberResponse]: + """update_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param update_my_guild_member_request: (required) + :type update_my_guild_member_request: UpdateMyGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_guild_member_serialize( + guild_id=guild_id, + update_my_guild_member_request=update_my_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_my_guild_member_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + update_my_guild_member_request: UpdateMyGuildMemberRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_my_guild_member + + + :param guild_id: (required) + :type guild_id: str + :param update_my_guild_member_request: (required) + :type update_my_guild_member_request: UpdateMyGuildMemberRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_guild_member_serialize( + guild_id=guild_id, + update_my_guild_member_request=update_my_guild_member_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PrivateGuildMemberResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_my_guild_member_serialize( + self, + guild_id, + update_my_guild_member_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_my_guild_member_request is not None: + _body_params = update_my_guild_member_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/members/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_my_user( + self, + bot_account_patch_request: BotAccountPatchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserPIIResponse: + """update_my_user + + + :param bot_account_patch_request: (required) + :type bot_account_patch_request: BotAccountPatchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_user_serialize( + bot_account_patch_request=bot_account_patch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_my_user_with_http_info( + self, + bot_account_patch_request: BotAccountPatchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserPIIResponse]: + """update_my_user + + + :param bot_account_patch_request: (required) + :type bot_account_patch_request: BotAccountPatchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_user_serialize( + bot_account_patch_request=bot_account_patch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_my_user_without_preload_content( + self, + bot_account_patch_request: BotAccountPatchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_my_user + + + :param bot_account_patch_request: (required) + :type bot_account_patch_request: BotAccountPatchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_my_user_serialize( + bot_account_patch_request=bot_account_patch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPIIResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_my_user_serialize( + self, + bot_account_patch_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bot_account_patch_request is not None: + _body_params = bot_account_patch_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/users/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_original_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """update_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_original_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """update_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_original_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_original_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_original_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_original_webhook_message_serialize( + self, + webhook_id, + webhook_token, + incoming_webhook_update_request_partial, + thread_id, + with_components, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + if with_components is not None: + + _query_params.append(('with_components', with_components)) + + # process the header parameters + # process the form parameters + # process the body parameter + if incoming_webhook_update_request_partial is not None: + _body_params = incoming_webhook_update_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/@original', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_self_voice_state( + self, + guild_id: Annotated[str, Field(strict=True)], + update_self_voice_state_request: UpdateSelfVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """update_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param update_self_voice_state_request: (required) + :type update_self_voice_state_request: UpdateSelfVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_self_voice_state_serialize( + guild_id=guild_id, + update_self_voice_state_request=update_self_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_self_voice_state_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + update_self_voice_state_request: UpdateSelfVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """update_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param update_self_voice_state_request: (required) + :type update_self_voice_state_request: UpdateSelfVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_self_voice_state_serialize( + guild_id=guild_id, + update_self_voice_state_request=update_self_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_self_voice_state_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + update_self_voice_state_request: UpdateSelfVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_self_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param update_self_voice_state_request: (required) + :type update_self_voice_state_request: UpdateSelfVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_self_voice_state_serialize( + guild_id=guild_id, + update_self_voice_state_request=update_self_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_self_voice_state_serialize( + self, + guild_id, + update_self_voice_state_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_self_voice_state_request is not None: + _body_params = update_self_voice_state_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/voice-states/@me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_stage_instance( + self, + channel_id: Annotated[str, Field(strict=True)], + update_stage_instance_request: UpdateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StageInstanceResponse: + """update_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param update_stage_instance_request: (required) + :type update_stage_instance_request: UpdateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_stage_instance_serialize( + channel_id=channel_id, + update_stage_instance_request=update_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_stage_instance_with_http_info( + self, + channel_id: Annotated[str, Field(strict=True)], + update_stage_instance_request: UpdateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StageInstanceResponse]: + """update_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param update_stage_instance_request: (required) + :type update_stage_instance_request: UpdateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_stage_instance_serialize( + channel_id=channel_id, + update_stage_instance_request=update_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_stage_instance_without_preload_content( + self, + channel_id: Annotated[str, Field(strict=True)], + update_stage_instance_request: UpdateStageInstanceRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_stage_instance + + + :param channel_id: (required) + :type channel_id: str + :param update_stage_instance_request: (required) + :type update_stage_instance_request: UpdateStageInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_stage_instance_serialize( + channel_id=channel_id, + update_stage_instance_request=update_stage_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StageInstanceResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_stage_instance_serialize( + self, + channel_id, + update_stage_instance_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if channel_id is not None: + _path_params['channel_id'] = channel_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_stage_instance_request is not None: + _body_params = update_stage_instance_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/stage-instances/{channel_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_voice_state( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_voice_state_request: UpdateVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """update_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_voice_state_request: (required) + :type update_voice_state_request: UpdateVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + update_voice_state_request=update_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_voice_state_with_http_info( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_voice_state_request: UpdateVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """update_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_voice_state_request: (required) + :type update_voice_state_request: UpdateVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + update_voice_state_request=update_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_voice_state_without_preload_content( + self, + guild_id: Annotated[str, Field(strict=True)], + user_id: Annotated[str, Field(strict=True)], + update_voice_state_request: UpdateVoiceStateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_voice_state + + + :param guild_id: (required) + :type guild_id: str + :param user_id: (required) + :type user_id: str + :param update_voice_state_request: (required) + :type update_voice_state_request: UpdateVoiceStateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_voice_state_serialize( + guild_id=guild_id, + user_id=user_id, + update_voice_state_request=update_voice_state_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_voice_state_serialize( + self, + guild_id, + user_id, + update_voice_state_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if guild_id is not None: + _path_params['guild_id'] = guild_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_voice_state_request is not None: + _body_params = update_voice_state_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/guilds/{guild_id}/voice-states/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_webhook( + self, + webhook_id: Annotated[str, Field(strict=True)], + update_webhook_request: UpdateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelWebhooks200ResponseInner: + """update_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param update_webhook_request: (required) + :type update_webhook_request: UpdateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_serialize( + webhook_id=webhook_id, + update_webhook_request=update_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_webhook_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + update_webhook_request: UpdateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelWebhooks200ResponseInner]: + """update_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param update_webhook_request: (required) + :type update_webhook_request: UpdateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_serialize( + webhook_id=webhook_id, + update_webhook_request=update_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_webhook_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + update_webhook_request: UpdateWebhookRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_webhook + + + :param webhook_id: (required) + :type webhook_id: str + :param update_webhook_request: (required) + :type update_webhook_request: UpdateWebhookRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_serialize( + webhook_id=webhook_id, + update_webhook_request=update_webhook_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_webhook_serialize( + self, + webhook_id, + update_webhook_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_webhook_request is not None: + _body_params = update_webhook_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/webhooks/{webhook_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_webhook_by_token( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + update_webhook_by_token_request: UpdateWebhookByTokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListChannelWebhooks200ResponseInner: + """update_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param update_webhook_by_token_request: (required) + :type update_webhook_by_token_request: UpdateWebhookByTokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + update_webhook_by_token_request=update_webhook_by_token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_webhook_by_token_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + update_webhook_by_token_request: UpdateWebhookByTokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListChannelWebhooks200ResponseInner]: + """update_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param update_webhook_by_token_request: (required) + :type update_webhook_by_token_request: UpdateWebhookByTokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + update_webhook_by_token_request=update_webhook_by_token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_webhook_by_token_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + update_webhook_by_token_request: UpdateWebhookByTokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_webhook_by_token + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param update_webhook_by_token_request: (required) + :type update_webhook_by_token_request: UpdateWebhookByTokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_by_token_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + update_webhook_by_token_request=update_webhook_by_token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListChannelWebhooks200ResponseInner", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_webhook_by_token_serialize( + self, + webhook_id, + webhook_token, + update_webhook_by_token_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_webhook_by_token_request is not None: + _body_params = update_webhook_by_token_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/webhooks/{webhook_id}/{webhook_token}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_webhook_message( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResponse: + """update_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_webhook_message_with_http_info( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResponse]: + """update_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_webhook_message_without_preload_content( + self, + webhook_id: Annotated[str, Field(strict=True)], + webhook_token: Annotated[str, Field(strict=True, max_length=152133)], + message_id: Annotated[str, Field(strict=True)], + incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial, + thread_id: Optional[Annotated[str, Field(strict=True)]] = None, + with_components: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_webhook_message + + + :param webhook_id: (required) + :type webhook_id: str + :param webhook_token: (required) + :type webhook_token: str + :param message_id: (required) + :type message_id: str + :param incoming_webhook_update_request_partial: (required) + :type incoming_webhook_update_request_partial: IncomingWebhookUpdateRequestPartial + :param thread_id: + :type thread_id: str + :param with_components: + :type with_components: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_webhook_message_serialize( + webhook_id=webhook_id, + webhook_token=webhook_token, + message_id=message_id, + incoming_webhook_update_request_partial=incoming_webhook_update_request_partial, + thread_id=thread_id, + with_components=with_components, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MessageResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_webhook_message_serialize( + self, + webhook_id, + webhook_token, + message_id, + incoming_webhook_update_request_partial, + thread_id, + with_components, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_id is not None: + _path_params['webhook_id'] = webhook_id + if webhook_token is not None: + _path_params['webhook_token'] = webhook_token + if message_id is not None: + _path_params['message_id'] = message_id + # process the query parameters + if thread_id is not None: + + _query_params.append(('thread_id', thread_id)) + + if with_components is not None: + + _query_params.append(('with_components', with_components)) + + # process the header parameters + # process the form parameters + # process the body parameter + if incoming_webhook_update_request_partial is not None: + _body_params = incoming_webhook_update_request_partial + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BotToken' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def upload_application_attachment( + self, + application_id: Annotated[str, Field(strict=True)], + file: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivitiesAttachmentResponse: + """upload_application_attachment + + + :param application_id: (required) + :type application_id: str + :param file: (required) + :type file: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_application_attachment_serialize( + application_id=application_id, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivitiesAttachmentResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def upload_application_attachment_with_http_info( + self, + application_id: Annotated[str, Field(strict=True)], + file: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivitiesAttachmentResponse]: + """upload_application_attachment + + + :param application_id: (required) + :type application_id: str + :param file: (required) + :type file: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_application_attachment_serialize( + application_id=application_id, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivitiesAttachmentResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def upload_application_attachment_without_preload_content( + self, + application_id: Annotated[str, Field(strict=True)], + file: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """upload_application_attachment + + + :param application_id: (required) + :type application_id: str + :param file: (required) + :type file: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_application_attachment_serialize( + application_id=application_id, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivitiesAttachmentResponse", + '4XX': "ErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upload_application_attachment_serialize( + self, + application_id, + file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if application_id is not None: + _path_params['application_id'] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + if file is not None: + _form_params.append(('file', file)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2', + 'OAuth2', + 'OAuth2', + 'BotToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/applications/{application_id}/attachment', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/dc_rest/api_client.py b/dc_rest/api_client.py new file mode 100644 index 0000000..d6e72c9 --- /dev/null +++ b/dc_rest/api_client.py @@ -0,0 +1,838 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from dc_rest.configuration import Configuration +from dc_rest.api_response import ApiResponse, T as ApiResponseT +import dc_rest.models +from dc_rest import rest +from dc_rest.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/10/python' + self.client_side_validation = configuration.client_side_validation + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_value, traceback): + await self.close() + + async def close(self): + await self.rest_client.close() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + async def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = await self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(dc_rest.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/dc_rest/api_response.py b/dc_rest/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/dc_rest/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/dc_rest/configuration.py b/dc_rest/configuration.py new file mode 100644 index 0000000..9dd1572 --- /dev/null +++ b/dc_rest/configuration.py @@ -0,0 +1,656 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "BotToken": APIKeyAuthSetting, + "OAuth2": OAuth2AuthSetting, + "OAuth2": OAuth2AuthSetting, + "OAuth2": OAuth2AuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = dc_rest.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://discord.com/api/v10" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("dc_rest") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = 100 + """This value is passed to the aiohttp to limit simultaneous connections. + Default values is 100, None means no-limit. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if 'BotToken' in self.api_key: + auth['BotToken'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix( + 'BotToken', + ), + } + if self.access_token is not None: + auth['OAuth2'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + if self.access_token is not None: + auth['OAuth2'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + if self.access_token is not None: + auth['OAuth2'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 10\n"\ + "SDK Package Version: 10".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://discord.com/api/v10", + 'description': "No description provided", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/dc_rest/exceptions.py b/dc_rest/exceptions.py new file mode 100644 index 0000000..1699af5 --- /dev/null +++ b/dc_rest/exceptions.py @@ -0,0 +1,250 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/dc_rest/models/__init__.py b/dc_rest/models/__init__.py new file mode 100644 index 0000000..ae37fb2 --- /dev/null +++ b/dc_rest/models/__init__.py @@ -0,0 +1,509 @@ +# coding: utf-8 + +# flake8: noqa +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +# import models into model package +from dc_rest.models.account_response import AccountResponse +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest +from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner +from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest +from dc_rest.models.action_row_component_response import ActionRowComponentResponse +from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse +from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest +from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice +from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice +from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice +from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial +from dc_rest.models.application_command_permission import ApplicationCommandPermission +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse +from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption +from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption +from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse +from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse +from dc_rest.models.application_form_partial import ApplicationFormPartial +from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription +from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue +from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse +from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse +from dc_rest.models.application_response import ApplicationResponse +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse +from dc_rest.models.attachment_response import AttachmentResponse +from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse +from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest +from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.basic_application_response import BasicApplicationResponse +from dc_rest.models.basic_message_response import BasicMessageResponse +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce +from dc_rest.models.block_message_action import BlockMessageAction +from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata +from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse +from dc_rest.models.block_message_action_response import BlockMessageActionResponse +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest +from dc_rest.models.button_component_response import ButtonComponentResponse +from dc_rest.models.channel_follower_response import ChannelFollowerResponse +from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse +from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest +from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse +from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue +from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse +from dc_rest.models.command_permission_response import CommandPermissionResponse +from dc_rest.models.command_permissions_response import CommandPermissionsResponse +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest +from dc_rest.models.component_emoji_response import ComponentEmojiResponse +from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse +from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse +from dc_rest.models.connected_account_response import ConnectedAccountResponse +from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest +from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner +from dc_rest.models.container_component_response import ContainerComponentResponse +from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData +from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest +from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest +from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest +from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem +from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest +from dc_rest.models.create_lobby_request import CreateLobbyRequest +from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest +from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest +from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest +from dc_rest.models.create_thread_request import CreateThreadRequest +from dc_rest.models.create_webhook_request import CreateWebhookRequest +from dc_rest.models.created_thread_response import CreatedThreadResponse +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata +from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse +from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse +from dc_rest.models.discord_integration_response import DiscordIntegrationResponse +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance +from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.entitlement_response import EntitlementResponse +from dc_rest.models.entity_metadata_external import EntityMetadataExternal +from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse +from dc_rest.models.error import Error +from dc_rest.models.error_details import ErrorDetails +from dc_rest.models.error_response import ErrorResponse +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest +from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse +from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest +from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial +from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest +from dc_rest.models.file_component_response import FileComponentResponse +from dc_rest.models.flag_to_channel_action import FlagToChannelAction +from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata +from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse +from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse +from dc_rest.models.follow_channel_request import FollowChannelRequest +from dc_rest.models.forum_tag_response import ForumTagResponse +from dc_rest.models.friend_invite_response import FriendInviteResponse +from dc_rest.models.gateway_bot_response import GatewayBotResponse +from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse +from dc_rest.models.gateway_response import GatewayResponse +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.models.github_author import GithubAuthor +from dc_rest.models.github_check_app import GithubCheckApp +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest +from dc_rest.models.github_check_run import GithubCheckRun +from dc_rest.models.github_check_run_output import GithubCheckRunOutput +from dc_rest.models.github_check_suite import GithubCheckSuite +from dc_rest.models.github_comment import GithubComment +from dc_rest.models.github_commit import GithubCommit +from dc_rest.models.github_discussion import GithubDiscussion +from dc_rest.models.github_issue import GithubIssue +from dc_rest.models.github_release import GithubRelease +from dc_rest.models.github_repository import GithubRepository +from dc_rest.models.github_review import GithubReview +from dc_rest.models.github_user import GithubUser +from dc_rest.models.github_webhook import GithubWebhook +from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse +from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner +from dc_rest.models.guild_ban_response import GuildBanResponse +from dc_rest.models.guild_channel_location import GuildChannelLocation +from dc_rest.models.guild_channel_response import GuildChannelResponse +from dc_rest.models.guild_create_request import GuildCreateRequest +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse +from dc_rest.models.guild_invite_response import GuildInviteResponse +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial +from dc_rest.models.guild_preview_response import GuildPreviewResponse +from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse +from dc_rest.models.guild_prune_response import GuildPruneResponse +from dc_rest.models.guild_response import GuildResponse +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse +from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse +from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse +from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse +from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel +from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse +from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest +from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial +from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial +from dc_rest.models.inner_errors import InnerErrors +from dc_rest.models.integration_application_response import IntegrationApplicationResponse +from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData +from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData +from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse +from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource +from dc_rest.models.interaction_response import InteractionResponse +from dc_rest.models.invite_application_response import InviteApplicationResponse +from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse +from dc_rest.models.invite_channel_response import InviteChannelResponse +from dc_rest.models.invite_guild_response import InviteGuildResponse +from dc_rest.models.keyword_rule_response import KeywordRuleResponse +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata +from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse +from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest +from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial +from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest +from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse +from dc_rest.models.lobby_member_request import LobbyMemberRequest +from dc_rest.models.lobby_member_response import LobbyMemberResponse +from dc_rest.models.lobby_message_response import LobbyMessageResponse +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse +from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest +from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse +from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest +from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata +from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse +from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest +from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial +from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest +from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner +from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse +from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.message_attachment_response import MessageAttachmentResponse +from dc_rest.models.message_call_response import MessageCallResponse +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse +from dc_rest.models.message_create_request import MessageCreateRequest +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial +from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse +from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse +from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse +from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse +from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse +from dc_rest.models.message_embed_response import MessageEmbedResponse +from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse +from dc_rest.models.message_interaction_response import MessageInteractionResponse +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse +from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse +from dc_rest.models.message_reaction_response import MessageReactionResponse +from dc_rest.models.message_reference_request import MessageReferenceRequest +from dc_rest.models.message_reference_response import MessageReferenceResponse +from dc_rest.models.message_response import MessageResponse +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse +from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse +from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest +from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData +from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse +from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata +from dc_rest.models.my_guild_response import MyGuildResponse +from dc_rest.models.new_member_action_response import NewMemberActionResponse +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse +from dc_rest.models.o_auth2_key import OAuth2Key +from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest +from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse +from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse +from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse +from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest +from dc_rest.models.pinned_message_response import PinnedMessageResponse +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse +from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse +from dc_rest.models.poll_answer_response import PollAnswerResponse +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.poll_emoji import PollEmoji +from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest +from dc_rest.models.poll_media import PollMedia +from dc_rest.models.poll_media_create_request import PollMediaCreateRequest +from dc_rest.models.poll_media_response import PollMediaResponse +from dc_rest.models.poll_response import PollResponse +from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse +from dc_rest.models.poll_results_response import PollResultsResponse +from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.models.private_channel_location import PrivateChannelLocation +from dc_rest.models.private_channel_response import PrivateChannelResponse +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse +from dc_rest.models.prune_guild_request import PruneGuildRequest +from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse +from dc_rest.models.quarantine_user_action import QuarantineUserAction +from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse +from dc_rest.models.resource_channel_response import ResourceChannelResponse +from dc_rest.models.rich_embed import RichEmbed +from dc_rest.models.rich_embed_author import RichEmbedAuthor +from dc_rest.models.rich_embed_field import RichEmbedField +from dc_rest.models.rich_embed_footer import RichEmbedFooter +from dc_rest.models.rich_embed_image import RichEmbedImage +from dc_rest.models.rich_embed_provider import RichEmbedProvider +from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail +from dc_rest.models.rich_embed_video import RichEmbedVideo +from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest +from dc_rest.models.role_select_component_response import RoleSelectComponentResponse +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse +from dc_rest.models.sdk_message_request import SDKMessageRequest +from dc_rest.models.scheduled_event_response import ScheduledEventResponse +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest +from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory +from dc_rest.models.section_component_response import SectionComponentResponse +from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest +from dc_rest.models.separator_component_response import SeparatorComponentResponse +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse +from dc_rest.models.slack_webhook import SlackWebhook +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse +from dc_rest.models.stage_instance_response import StageInstanceResponse +from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest +from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial +from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse +from dc_rest.models.standard_sticker_response import StandardStickerResponse +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse +from dc_rest.models.sticker_pack_response import StickerPackResponse +from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest +from dc_rest.models.string_select_component_response import StringSelectComponentResponse +from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest +from dc_rest.models.string_select_option_response import StringSelectOptionResponse +from dc_rest.models.team_member_response import TeamMemberResponse +from dc_rest.models.team_response import TeamResponse +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse +from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest +from dc_rest.models.text_input_component_response import TextInputComponentResponse +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.models.thread_search_response import ThreadSearchResponse +from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest +from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest +from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest +from dc_rest.models.update_channel_request import UpdateChannelRequest +from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest +from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial +from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest +from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest +from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest +from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest +from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial +from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest +from dc_rest.models.update_webhook_request import UpdateWebhookRequest +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse +from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction +from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata +from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse +from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse +from dc_rest.models.user_nameplate_response import UserNameplateResponse +from dc_rest.models.user_pii_response import UserPIIResponse +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse +from dc_rest.models.user_response import UserResponse +from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest +from dc_rest.models.user_select_component_response import UserSelectComponentResponse +from dc_rest.models.user_select_default_value import UserSelectDefaultValue +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse +from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse +from dc_rest.models.vanity_url_response import VanityURLResponse +from dc_rest.models.voice_region_response import VoiceRegionResponse +from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest +from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial +from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse +from dc_rest.models.voice_state_response import VoiceStateResponse +from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed +from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField +from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse +from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse +from dc_rest.models.welcome_message_response import WelcomeMessageResponse +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial +from dc_rest.models.widget_activity import WidgetActivity +from dc_rest.models.widget_channel import WidgetChannel +from dc_rest.models.widget_member import WidgetMember +from dc_rest.models.widget_response import WidgetResponse +from dc_rest.models.widget_settings_response import WidgetSettingsResponse diff --git a/dc_rest/models/account_response.py b/dc_rest/models/account_response.py new file mode 100644 index 0000000..14ec10f --- /dev/null +++ b/dc_rest/models/account_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccountResponse(BaseModel): + """ + AccountResponse + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AccountResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/action_row_component_for_message_request.py b/dc_rest/models/action_row_component_for_message_request.py new file mode 100644 index 0000000..0e9086d --- /dev/null +++ b/dc_rest/models/action_row_component_for_message_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner +from typing import Optional, Set +from typing_extensions import Self + +class ActionRowComponentForMessageRequest(BaseModel): + """ + ActionRowComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + components: Annotated[List[ActionRowComponentForMessageRequestComponentsInner], Field(min_length=1, max_length=5)] + __properties: ClassVar[List[str]] = ["type", "components"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionRowComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionRowComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActionRowComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "components": [ActionRowComponentForMessageRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/action_row_component_for_message_request_components_inner.py b/dc_rest/models/action_row_component_for_message_request_components_inner.py new file mode 100644 index 0000000..c216a1a --- /dev/null +++ b/dc_rest/models/action_row_component_for_message_request_components_inner.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest +from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest +from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest +from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest +from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest +from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ACTIONROWCOMPONENTFORMESSAGEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ButtonComponentForMessageRequest", "ChannelSelectComponentForMessageRequest", "MentionableSelectComponentForMessageRequest", "RoleSelectComponentForMessageRequest", "StringSelectComponentForMessageRequest", "UserSelectComponentForMessageRequest"] + +class ActionRowComponentForMessageRequestComponentsInner(BaseModel): + """ + ActionRowComponentForMessageRequestComponentsInner + """ + # data type: ButtonComponentForMessageRequest + oneof_schema_1_validator: Optional[ButtonComponentForMessageRequest] = None + # data type: ChannelSelectComponentForMessageRequest + oneof_schema_2_validator: Optional[ChannelSelectComponentForMessageRequest] = None + # data type: MentionableSelectComponentForMessageRequest + oneof_schema_3_validator: Optional[MentionableSelectComponentForMessageRequest] = None + # data type: RoleSelectComponentForMessageRequest + oneof_schema_4_validator: Optional[RoleSelectComponentForMessageRequest] = None + # data type: StringSelectComponentForMessageRequest + oneof_schema_5_validator: Optional[StringSelectComponentForMessageRequest] = None + # data type: UserSelectComponentForMessageRequest + oneof_schema_6_validator: Optional[UserSelectComponentForMessageRequest] = None + actual_instance: Optional[Union[ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest]] = None + one_of_schemas: Set[str] = { "ButtonComponentForMessageRequest", "ChannelSelectComponentForMessageRequest", "MentionableSelectComponentForMessageRequest", "RoleSelectComponentForMessageRequest", "StringSelectComponentForMessageRequest", "UserSelectComponentForMessageRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ActionRowComponentForMessageRequestComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ButtonComponentForMessageRequest + if not isinstance(v, ButtonComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentForMessageRequest`") + else: + match += 1 + # validate data type: ChannelSelectComponentForMessageRequest + if not isinstance(v, ChannelSelectComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ChannelSelectComponentForMessageRequest`") + else: + match += 1 + # validate data type: MentionableSelectComponentForMessageRequest + if not isinstance(v, MentionableSelectComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionableSelectComponentForMessageRequest`") + else: + match += 1 + # validate data type: RoleSelectComponentForMessageRequest + if not isinstance(v, RoleSelectComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectComponentForMessageRequest`") + else: + match += 1 + # validate data type: StringSelectComponentForMessageRequest + if not isinstance(v, StringSelectComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `StringSelectComponentForMessageRequest`") + else: + match += 1 + # validate data type: UserSelectComponentForMessageRequest + if not isinstance(v, UserSelectComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectComponentForMessageRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ButtonComponentForMessageRequest + try: + instance.actual_instance = ButtonComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ChannelSelectComponentForMessageRequest + try: + instance.actual_instance = ChannelSelectComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MentionableSelectComponentForMessageRequest + try: + instance.actual_instance = MentionableSelectComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RoleSelectComponentForMessageRequest + try: + instance.actual_instance = RoleSelectComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StringSelectComponentForMessageRequest + try: + instance.actual_instance = StringSelectComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserSelectComponentForMessageRequest + try: + instance.actual_instance = UserSelectComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ActionRowComponentForMessageRequestComponentsInner with oneOf schemas: ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentForMessageRequest, ChannelSelectComponentForMessageRequest, MentionableSelectComponentForMessageRequest, RoleSelectComponentForMessageRequest, StringSelectComponentForMessageRequest, UserSelectComponentForMessageRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/action_row_component_for_modal_request.py b/dc_rest/models/action_row_component_for_modal_request.py new file mode 100644 index 0000000..2fe890a --- /dev/null +++ b/dc_rest/models/action_row_component_for_modal_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest +from typing import Optional, Set +from typing_extensions import Self + +class ActionRowComponentForModalRequest(BaseModel): + """ + ActionRowComponentForModalRequest + """ # noqa: E501 + type: StrictInt + components: Annotated[List[TextInputComponentForModalRequest], Field(min_length=1, max_length=5)] + __properties: ClassVar[List[str]] = ["type", "components"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionRowComponentForModalRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionRowComponentForModalRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActionRowComponentForModalRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "components": [TextInputComponentForModalRequest.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/action_row_component_response.py b/dc_rest/models/action_row_component_response.py new file mode 100644 index 0000000..2bc5a28 --- /dev/null +++ b/dc_rest/models/action_row_component_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner +from typing import Optional, Set +from typing_extensions import Self + +class ActionRowComponentResponse(BaseModel): + """ + ActionRowComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + components: Optional[List[ActionRowComponentResponseComponentsInner]] = None + __properties: ClassVar[List[str]] = ["type", "id", "components"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionRowComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionRowComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActionRowComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "components": [ActionRowComponentResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/action_row_component_response_components_inner.py b/dc_rest/models/action_row_component_response_components_inner.py new file mode 100644 index 0000000..08f55f4 --- /dev/null +++ b/dc_rest/models/action_row_component_response_components_inner.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.button_component_response import ButtonComponentResponse +from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse +from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse +from dc_rest.models.role_select_component_response import RoleSelectComponentResponse +from dc_rest.models.string_select_component_response import StringSelectComponentResponse +from dc_rest.models.text_input_component_response import TextInputComponentResponse +from dc_rest.models.user_select_component_response import UserSelectComponentResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ACTIONROWCOMPONENTRESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ButtonComponentResponse", "ChannelSelectComponentResponse", "MentionableSelectComponentResponse", "RoleSelectComponentResponse", "StringSelectComponentResponse", "TextInputComponentResponse", "UserSelectComponentResponse"] + +class ActionRowComponentResponseComponentsInner(BaseModel): + """ + ActionRowComponentResponseComponentsInner + """ + # data type: ButtonComponentResponse + oneof_schema_1_validator: Optional[ButtonComponentResponse] = None + # data type: ChannelSelectComponentResponse + oneof_schema_2_validator: Optional[ChannelSelectComponentResponse] = None + # data type: MentionableSelectComponentResponse + oneof_schema_3_validator: Optional[MentionableSelectComponentResponse] = None + # data type: RoleSelectComponentResponse + oneof_schema_4_validator: Optional[RoleSelectComponentResponse] = None + # data type: StringSelectComponentResponse + oneof_schema_5_validator: Optional[StringSelectComponentResponse] = None + # data type: TextInputComponentResponse + oneof_schema_6_validator: Optional[TextInputComponentResponse] = None + # data type: UserSelectComponentResponse + oneof_schema_7_validator: Optional[UserSelectComponentResponse] = None + actual_instance: Optional[Union[ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse]] = None + one_of_schemas: Set[str] = { "ButtonComponentResponse", "ChannelSelectComponentResponse", "MentionableSelectComponentResponse", "RoleSelectComponentResponse", "StringSelectComponentResponse", "TextInputComponentResponse", "UserSelectComponentResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ActionRowComponentResponseComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ButtonComponentResponse + if not isinstance(v, ButtonComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentResponse`") + else: + match += 1 + # validate data type: ChannelSelectComponentResponse + if not isinstance(v, ChannelSelectComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ChannelSelectComponentResponse`") + else: + match += 1 + # validate data type: MentionableSelectComponentResponse + if not isinstance(v, MentionableSelectComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionableSelectComponentResponse`") + else: + match += 1 + # validate data type: RoleSelectComponentResponse + if not isinstance(v, RoleSelectComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectComponentResponse`") + else: + match += 1 + # validate data type: StringSelectComponentResponse + if not isinstance(v, StringSelectComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `StringSelectComponentResponse`") + else: + match += 1 + # validate data type: TextInputComponentResponse + if not isinstance(v, TextInputComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextInputComponentResponse`") + else: + match += 1 + # validate data type: UserSelectComponentResponse + if not isinstance(v, UserSelectComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectComponentResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ButtonComponentResponse + try: + instance.actual_instance = ButtonComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ChannelSelectComponentResponse + try: + instance.actual_instance = ChannelSelectComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MentionableSelectComponentResponse + try: + instance.actual_instance = MentionableSelectComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RoleSelectComponentResponse + try: + instance.actual_instance = RoleSelectComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StringSelectComponentResponse + try: + instance.actual_instance = StringSelectComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextInputComponentResponse + try: + instance.actual_instance = TextInputComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserSelectComponentResponse + try: + instance.actual_instance = UserSelectComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ActionRowComponentResponseComponentsInner with oneOf schemas: ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentResponse, ChannelSelectComponentResponse, MentionableSelectComponentResponse, RoleSelectComponentResponse, StringSelectComponentResponse, TextInputComponentResponse, UserSelectComponentResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/activities_attachment_response.py b/dc_rest/models/activities_attachment_response.py new file mode 100644 index 0000000..856fa4a --- /dev/null +++ b/dc_rest/models/activities_attachment_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.attachment_response import AttachmentResponse +from typing import Optional, Set +from typing_extensions import Self + +class ActivitiesAttachmentResponse(BaseModel): + """ + ActivitiesAttachmentResponse + """ # noqa: E501 + attachment: AttachmentResponse + __properties: ClassVar[List[str]] = ["attachment"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivitiesAttachmentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of attachment + if self.attachment: + _dict['attachment'] = self.attachment.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivitiesAttachmentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActivitiesAttachmentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "attachment": AttachmentResponse.from_dict(obj["attachment"]) if obj.get("attachment") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/add_group_dm_user201_response.py b/dc_rest/models/add_group_dm_user201_response.py new file mode 100644 index 0000000..7212738 --- /dev/null +++ b/dc_rest/models/add_group_dm_user201_response.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.private_channel_response import PrivateChannelResponse +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ADDGROUPDMUSER201RESPONSE_ONE_OF_SCHEMAS = ["PrivateChannelResponse", "PrivateGroupChannelResponse"] + +class AddGroupDmUser201Response(BaseModel): + """ + AddGroupDmUser201Response + """ + # data type: PrivateChannelResponse + oneof_schema_1_validator: Optional[PrivateChannelResponse] = None + # data type: PrivateGroupChannelResponse + oneof_schema_2_validator: Optional[PrivateGroupChannelResponse] = None + actual_instance: Optional[Union[PrivateChannelResponse, PrivateGroupChannelResponse]] = None + one_of_schemas: Set[str] = { "PrivateChannelResponse", "PrivateGroupChannelResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AddGroupDmUser201Response.model_construct() + error_messages = [] + match = 0 + # validate data type: PrivateChannelResponse + if not isinstance(v, PrivateChannelResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelResponse`") + else: + match += 1 + # validate data type: PrivateGroupChannelResponse + if not isinstance(v, PrivateGroupChannelResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateGroupChannelResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into PrivateChannelResponse + try: + instance.actual_instance = PrivateChannelResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PrivateGroupChannelResponse + try: + instance.actual_instance = PrivateGroupChannelResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AddGroupDmUser201Response with oneOf schemas: PrivateChannelResponse, PrivateGroupChannelResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], PrivateChannelResponse, PrivateGroupChannelResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/add_group_dm_user_request.py b/dc_rest/models/add_group_dm_user_request.py new file mode 100644 index 0000000..6a15f08 --- /dev/null +++ b/dc_rest/models/add_group_dm_user_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddGroupDmUserRequest(BaseModel): + """ + AddGroupDmUserRequest + """ # noqa: E501 + access_token: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + nick: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + __properties: ClassVar[List[str]] = ["access_token", "nick"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGroupDmUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if access_token (nullable) is None + # and model_fields_set contains the field + if self.access_token is None and "access_token" in self.model_fields_set: + _dict['access_token'] = None + + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGroupDmUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AddGroupDmUserRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "nick": obj.get("nick") + }) + return _obj + + diff --git a/dc_rest/models/add_guild_member_request.py b/dc_rest/models/add_guild_member_request.py new file mode 100644 index 0000000..e784296 --- /dev/null +++ b/dc_rest/models/add_guild_member_request.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddGuildMemberRequest(BaseModel): + """ + AddGuildMemberRequest + """ # noqa: E501 + nick: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None + roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None + mute: Optional[StrictBool] = None + deaf: Optional[StrictBool] = None + access_token: Annotated[str, Field(strict=True, max_length=152133)] + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["nick", "roles", "mute", "deaf", "access_token", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGuildMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + # set to None if mute (nullable) is None + # and model_fields_set contains the field + if self.mute is None and "mute" in self.model_fields_set: + _dict['mute'] = None + + # set to None if deaf (nullable) is None + # and model_fields_set contains the field + if self.deaf is None and "deaf" in self.model_fields_set: + _dict['deaf'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGuildMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AddGuildMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "nick": obj.get("nick"), + "roles": obj.get("roles"), + "mute": obj.get("mute"), + "deaf": obj.get("deaf"), + "access_token": obj.get("access_token"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/add_lobby_member_request.py b/dc_rest/models/add_lobby_member_request.py new file mode 100644 index 0000000..b55b0ee --- /dev/null +++ b/dc_rest/models/add_lobby_member_request.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddLobbyMemberRequest(BaseModel): + """ + AddLobbyMemberRequest + """ # noqa: E501 + metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["metadata", "flags"] + + @field_validator('flags') + def flags_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([1]): + raise ValueError("must be one of enum values (1)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddLobbyMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddLobbyMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AddLobbyMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "metadata": obj.get("metadata"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/application_command_attachment_option.py b/dc_rest/models/application_command_attachment_option.py new file mode 100644 index 0000000..7f91ffb --- /dev/null +++ b/dc_rest/models/application_command_attachment_option.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandAttachmentOption(BaseModel): + """ + ApplicationCommandAttachmentOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandAttachmentOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandAttachmentOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandAttachmentOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_attachment_option_response.py b/dc_rest/models/application_command_attachment_option_response.py new file mode 100644 index 0000000..962ffe0 --- /dev/null +++ b/dc_rest/models/application_command_attachment_option_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandAttachmentOptionResponse(BaseModel): + """ + ApplicationCommandAttachmentOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandAttachmentOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandAttachmentOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandAttachmentOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_autocomplete_callback_request.py b/dc_rest/models/application_command_autocomplete_callback_request.py new file mode 100644 index 0000000..7a65a80 --- /dev/null +++ b/dc_rest/models/application_command_autocomplete_callback_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandAutocompleteCallbackRequest(BaseModel): + """ + ApplicationCommandAutocompleteCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + data: ApplicationCommandAutocompleteCallbackRequestData + __properties: ClassVar[List[str]] = ["type", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandAutocompleteCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandAutocompleteCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandAutocompleteCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "data": ApplicationCommandAutocompleteCallbackRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_autocomplete_callback_request_data.py b/dc_rest/models/application_command_autocomplete_callback_request_data.py new file mode 100644 index 0000000..0cf6f65 --- /dev/null +++ b/dc_rest/models/application_command_autocomplete_callback_request_data.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData +from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData +from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +APPLICATIONCOMMANDAUTOCOMPLETECALLBACKREQUESTDATA_ANY_OF_SCHEMAS = ["InteractionApplicationCommandAutocompleteCallbackIntegerData", "InteractionApplicationCommandAutocompleteCallbackNumberData", "InteractionApplicationCommandAutocompleteCallbackStringData"] + +class ApplicationCommandAutocompleteCallbackRequestData(BaseModel): + """ + ApplicationCommandAutocompleteCallbackRequestData + """ + + # data type: InteractionApplicationCommandAutocompleteCallbackIntegerData + anyof_schema_1_validator: Optional[InteractionApplicationCommandAutocompleteCallbackIntegerData] = None + # data type: InteractionApplicationCommandAutocompleteCallbackNumberData + anyof_schema_2_validator: Optional[InteractionApplicationCommandAutocompleteCallbackNumberData] = None + # data type: InteractionApplicationCommandAutocompleteCallbackStringData + anyof_schema_3_validator: Optional[InteractionApplicationCommandAutocompleteCallbackStringData] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "InteractionApplicationCommandAutocompleteCallbackIntegerData", "InteractionApplicationCommandAutocompleteCallbackNumberData", "InteractionApplicationCommandAutocompleteCallbackStringData" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ApplicationCommandAutocompleteCallbackRequestData.model_construct() + error_messages = [] + # validate data type: InteractionApplicationCommandAutocompleteCallbackIntegerData + if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackIntegerData): + error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackIntegerData`") + else: + return v + + # validate data type: InteractionApplicationCommandAutocompleteCallbackNumberData + if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackNumberData): + error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackNumberData`") + else: + return v + + # validate data type: InteractionApplicationCommandAutocompleteCallbackStringData + if not isinstance(v, InteractionApplicationCommandAutocompleteCallbackStringData): + error_messages.append(f"Error! Input type `{type(v)}` is not `InteractionApplicationCommandAutocompleteCallbackStringData`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ApplicationCommandAutocompleteCallbackRequestData with anyOf schemas: InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[InteractionApplicationCommandAutocompleteCallbackIntegerData] = None + try: + instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackIntegerData.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[InteractionApplicationCommandAutocompleteCallbackNumberData] = None + try: + instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackNumberData.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[InteractionApplicationCommandAutocompleteCallbackStringData] = None + try: + instance.actual_instance = InteractionApplicationCommandAutocompleteCallbackStringData.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationCommandAutocompleteCallbackRequestData with anyOf schemas: InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], InteractionApplicationCommandAutocompleteCallbackIntegerData, InteractionApplicationCommandAutocompleteCallbackNumberData, InteractionApplicationCommandAutocompleteCallbackStringData]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_command_boolean_option.py b/dc_rest/models/application_command_boolean_option.py new file mode 100644 index 0000000..0418004 --- /dev/null +++ b/dc_rest/models/application_command_boolean_option.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandBooleanOption(BaseModel): + """ + ApplicationCommandBooleanOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandBooleanOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandBooleanOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandBooleanOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_boolean_option_response.py b/dc_rest/models/application_command_boolean_option_response.py new file mode 100644 index 0000000..7526ebd --- /dev/null +++ b/dc_rest/models/application_command_boolean_option_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandBooleanOptionResponse(BaseModel): + """ + ApplicationCommandBooleanOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandBooleanOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandBooleanOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandBooleanOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_channel_option.py b/dc_rest/models/application_command_channel_option.py new file mode 100644 index 0000000..0b6215b --- /dev/null +++ b/dc_rest/models/application_command_channel_option.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandChannelOption(BaseModel): + """ + ApplicationCommandChannelOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + channel_types: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "channel_types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandChannelOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if channel_types (nullable) is None + # and model_fields_set contains the field + if self.channel_types is None and "channel_types" in self.model_fields_set: + _dict['channel_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandChannelOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandChannelOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "channel_types": obj.get("channel_types") + }) + return _obj + + diff --git a/dc_rest/models/application_command_channel_option_response.py b/dc_rest/models/application_command_channel_option_response.py new file mode 100644 index 0000000..11e52d0 --- /dev/null +++ b/dc_rest/models/application_command_channel_option_response.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandChannelOptionResponse(BaseModel): + """ + ApplicationCommandChannelOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + channel_types: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "channel_types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandChannelOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if channel_types (nullable) is None + # and model_fields_set contains the field + if self.channel_types is None and "channel_types" in self.model_fields_set: + _dict['channel_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandChannelOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandChannelOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "channel_types": obj.get("channel_types") + }) + return _obj + + diff --git a/dc_rest/models/application_command_create_request.py b/dc_rest/models/application_command_create_request.py new file mode 100644 index 0000000..b3540f7 --- /dev/null +++ b/dc_rest/models/application_command_create_request.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandCreateRequest(BaseModel): + """ + ApplicationCommandCreateRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None + default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None + dm_permission: Optional[StrictBool] = None + contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + handler: Optional[StrictInt] = None + type: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + # set to None if default_member_permissions (nullable) is None + # and model_fields_set contains the field + if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set: + _dict['default_member_permissions'] = None + + # set to None if dm_permission (nullable) is None + # and model_fields_set contains the field + if self.dm_permission is None and "dm_permission" in self.model_fields_set: + _dict['dm_permission'] = None + + # set to None if contexts (nullable) is None + # and model_fields_set contains the field + if self.contexts is None and "contexts" in self.model_fields_set: + _dict['contexts'] = None + + # set to None if integration_types (nullable) is None + # and model_fields_set contains the field + if self.integration_types is None and "integration_types" in self.model_fields_set: + _dict['integration_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "default_member_permissions": obj.get("default_member_permissions"), + "dm_permission": obj.get("dm_permission"), + "contexts": obj.get("contexts"), + "integration_types": obj.get("integration_types"), + "handler": obj.get("handler"), + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/application_command_create_request_options_inner.py b/dc_rest/models/application_command_create_request_options_inner.py new file mode 100644 index 0000000..3d4da2f --- /dev/null +++ b/dc_rest/models/application_command_create_request_options_inner.py @@ -0,0 +1,297 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption +from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APPLICATIONCOMMANDCREATEREQUESTOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandSubcommandGroupOption", "ApplicationCommandSubcommandOption", "ApplicationCommandUserOption"] + +class ApplicationCommandCreateRequestOptionsInner(BaseModel): + """ + ApplicationCommandCreateRequestOptionsInner + """ + # data type: ApplicationCommandAttachmentOption + oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOption] = None + # data type: ApplicationCommandBooleanOption + oneof_schema_2_validator: Optional[ApplicationCommandBooleanOption] = None + # data type: ApplicationCommandChannelOption + oneof_schema_3_validator: Optional[ApplicationCommandChannelOption] = None + # data type: ApplicationCommandIntegerOption + oneof_schema_4_validator: Optional[ApplicationCommandIntegerOption] = None + # data type: ApplicationCommandMentionableOption + oneof_schema_5_validator: Optional[ApplicationCommandMentionableOption] = None + # data type: ApplicationCommandNumberOption + oneof_schema_6_validator: Optional[ApplicationCommandNumberOption] = None + # data type: ApplicationCommandRoleOption + oneof_schema_7_validator: Optional[ApplicationCommandRoleOption] = None + # data type: ApplicationCommandStringOption + oneof_schema_8_validator: Optional[ApplicationCommandStringOption] = None + # data type: ApplicationCommandSubcommandGroupOption + oneof_schema_9_validator: Optional[ApplicationCommandSubcommandGroupOption] = None + # data type: ApplicationCommandSubcommandOption + oneof_schema_10_validator: Optional[ApplicationCommandSubcommandOption] = None + # data type: ApplicationCommandUserOption + oneof_schema_11_validator: Optional[ApplicationCommandUserOption] = None + actual_instance: Optional[Union[ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption]] = None + one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandSubcommandGroupOption", "ApplicationCommandSubcommandOption", "ApplicationCommandUserOption" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApplicationCommandCreateRequestOptionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandAttachmentOption + if not isinstance(v, ApplicationCommandAttachmentOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOption`") + else: + match += 1 + # validate data type: ApplicationCommandBooleanOption + if not isinstance(v, ApplicationCommandBooleanOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOption`") + else: + match += 1 + # validate data type: ApplicationCommandChannelOption + if not isinstance(v, ApplicationCommandChannelOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOption`") + else: + match += 1 + # validate data type: ApplicationCommandIntegerOption + if not isinstance(v, ApplicationCommandIntegerOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOption`") + else: + match += 1 + # validate data type: ApplicationCommandMentionableOption + if not isinstance(v, ApplicationCommandMentionableOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOption`") + else: + match += 1 + # validate data type: ApplicationCommandNumberOption + if not isinstance(v, ApplicationCommandNumberOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOption`") + else: + match += 1 + # validate data type: ApplicationCommandRoleOption + if not isinstance(v, ApplicationCommandRoleOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOption`") + else: + match += 1 + # validate data type: ApplicationCommandStringOption + if not isinstance(v, ApplicationCommandStringOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOption`") + else: + match += 1 + # validate data type: ApplicationCommandSubcommandGroupOption + if not isinstance(v, ApplicationCommandSubcommandGroupOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandGroupOption`") + else: + match += 1 + # validate data type: ApplicationCommandSubcommandOption + if not isinstance(v, ApplicationCommandSubcommandOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandOption`") + else: + match += 1 + # validate data type: ApplicationCommandUserOption + if not isinstance(v, ApplicationCommandUserOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOption`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandAttachmentOption + try: + instance.actual_instance = ApplicationCommandAttachmentOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandBooleanOption + try: + instance.actual_instance = ApplicationCommandBooleanOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandChannelOption + try: + instance.actual_instance = ApplicationCommandChannelOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandIntegerOption + try: + instance.actual_instance = ApplicationCommandIntegerOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandMentionableOption + try: + instance.actual_instance = ApplicationCommandMentionableOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandNumberOption + try: + instance.actual_instance = ApplicationCommandNumberOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandRoleOption + try: + instance.actual_instance = ApplicationCommandRoleOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandStringOption + try: + instance.actual_instance = ApplicationCommandStringOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandSubcommandGroupOption + try: + instance.actual_instance = ApplicationCommandSubcommandGroupOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandSubcommandOption + try: + instance.actual_instance = ApplicationCommandSubcommandOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandUserOption + try: + instance.actual_instance = ApplicationCommandUserOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationCommandCreateRequestOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandSubcommandGroupOption, ApplicationCommandSubcommandOption, ApplicationCommandUserOption]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_command_integer_option.py b/dc_rest/models/application_command_integer_option.py new file mode 100644 index 0000000..3442c1b --- /dev/null +++ b/dc_rest/models/application_command_integer_option.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandIntegerOption(BaseModel): + """ + ApplicationCommandIntegerOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + choices: Optional[Annotated[List[ApplicationCommandOptionIntegerChoice], Field(max_length=25)]] = None + min_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None + max_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandIntegerOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandIntegerOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandIntegerOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "choices": [ApplicationCommandOptionIntegerChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None, + "min_value": obj.get("min_value"), + "max_value": obj.get("max_value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_integer_option_response.py b/dc_rest/models/application_command_integer_option_response.py new file mode 100644 index 0000000..b15aefd --- /dev/null +++ b/dc_rest/models/application_command_integer_option_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandIntegerOptionResponse(BaseModel): + """ + ApplicationCommandIntegerOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + choices: Optional[List[ApplicationCommandOptionIntegerChoiceResponse]] = None + min_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None + max_value: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandIntegerOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandIntegerOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandIntegerOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "choices": [ApplicationCommandOptionIntegerChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None, + "min_value": obj.get("min_value"), + "max_value": obj.get("max_value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_interaction_metadata_response.py b/dc_rest/models/application_command_interaction_metadata_response.py new file mode 100644 index 0000000..b9aea42 --- /dev/null +++ b/dc_rest/models/application_command_interaction_metadata_response.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandInteractionMetadataResponse(BaseModel): + """ + ApplicationCommandInteractionMetadataResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + user: Optional[UserResponse] = None + authorizing_integration_owners: Dict[str, Annotated[str, Field(strict=True)]] + original_response_message_id: Optional[Annotated[str, Field(strict=True)]] = None + target_user: Optional[UserResponse] = None + target_message_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "type", "user", "authorizing_integration_owners", "original_response_message_id", "target_user", "target_message_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('original_response_message_id') + def original_response_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('target_message_id') + def target_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandInteractionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_user + if self.target_user: + _dict['target_user'] = self.target_user.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if target_user (nullable) is None + # and model_fields_set contains the field + if self.target_user is None and "target_user" in self.model_fields_set: + _dict['target_user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandInteractionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandInteractionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "authorizing_integration_owners": obj.get("authorizing_integration_owners"), + "original_response_message_id": obj.get("original_response_message_id"), + "target_user": UserResponse.from_dict(obj["target_user"]) if obj.get("target_user") is not None else None, + "target_message_id": obj.get("target_message_id") + }) + return _obj + + diff --git a/dc_rest/models/application_command_mentionable_option.py b/dc_rest/models/application_command_mentionable_option.py new file mode 100644 index 0000000..6a495e7 --- /dev/null +++ b/dc_rest/models/application_command_mentionable_option.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandMentionableOption(BaseModel): + """ + ApplicationCommandMentionableOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandMentionableOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandMentionableOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandMentionableOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_mentionable_option_response.py b/dc_rest/models/application_command_mentionable_option_response.py new file mode 100644 index 0000000..66cf56e --- /dev/null +++ b/dc_rest/models/application_command_mentionable_option_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandMentionableOptionResponse(BaseModel): + """ + ApplicationCommandMentionableOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandMentionableOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandMentionableOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandMentionableOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_number_option.py b/dc_rest/models/application_command_number_option.py new file mode 100644 index 0000000..6530512 --- /dev/null +++ b/dc_rest/models/application_command_number_option.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandNumberOption(BaseModel): + """ + ApplicationCommandNumberOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + choices: Optional[Annotated[List[ApplicationCommandOptionNumberChoice], Field(max_length=25)]] = None + min_value: Optional[Union[StrictFloat, StrictInt]] = None + max_value: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandNumberOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + # set to None if min_value (nullable) is None + # and model_fields_set contains the field + if self.min_value is None and "min_value" in self.model_fields_set: + _dict['min_value'] = None + + # set to None if max_value (nullable) is None + # and model_fields_set contains the field + if self.max_value is None and "max_value" in self.model_fields_set: + _dict['max_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandNumberOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandNumberOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "choices": [ApplicationCommandOptionNumberChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None, + "min_value": obj.get("min_value"), + "max_value": obj.get("max_value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_number_option_response.py b/dc_rest/models/application_command_number_option_response.py new file mode 100644 index 0000000..c801b74 --- /dev/null +++ b/dc_rest/models/application_command_number_option_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandNumberOptionResponse(BaseModel): + """ + ApplicationCommandNumberOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + choices: Optional[List[ApplicationCommandOptionNumberChoiceResponse]] = None + min_value: Optional[Union[StrictFloat, StrictInt]] = None + max_value: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_value", "max_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandNumberOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + # set to None if min_value (nullable) is None + # and model_fields_set contains the field + if self.min_value is None and "min_value" in self.model_fields_set: + _dict['min_value'] = None + + # set to None if max_value (nullable) is None + # and model_fields_set contains the field + if self.max_value is None and "max_value" in self.model_fields_set: + _dict['max_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandNumberOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandNumberOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "choices": [ApplicationCommandOptionNumberChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None, + "min_value": obj.get("min_value"), + "max_value": obj.get("max_value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_integer_choice.py b/dc_rest/models/application_command_option_integer_choice.py new file mode 100644 index 0000000..b205991 --- /dev/null +++ b/dc_rest/models/application_command_option_integer_choice.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionIntegerChoice(BaseModel): + """ + ApplicationCommandOptionIntegerChoice + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + value: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)] + __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionIntegerChoice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionIntegerChoice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionIntegerChoice) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_integer_choice_response.py b/dc_rest/models/application_command_option_integer_choice_response.py new file mode 100644 index 0000000..1fc7ad8 --- /dev/null +++ b/dc_rest/models/application_command_option_integer_choice_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionIntegerChoiceResponse(BaseModel): + """ + ApplicationCommandOptionIntegerChoiceResponse + """ # noqa: E501 + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + value: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)] + __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionIntegerChoiceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionIntegerChoiceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionIntegerChoiceResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_number_choice.py b/dc_rest/models/application_command_option_number_choice.py new file mode 100644 index 0000000..06aea35 --- /dev/null +++ b/dc_rest/models/application_command_option_number_choice.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionNumberChoice(BaseModel): + """ + ApplicationCommandOptionNumberChoice + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionNumberChoice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionNumberChoice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionNumberChoice) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_number_choice_response.py b/dc_rest/models/application_command_option_number_choice_response.py new file mode 100644 index 0000000..4e389a1 --- /dev/null +++ b/dc_rest/models/application_command_option_number_choice_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionNumberChoiceResponse(BaseModel): + """ + ApplicationCommandOptionNumberChoiceResponse + """ # noqa: E501 + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + value: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionNumberChoiceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionNumberChoiceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionNumberChoiceResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_string_choice.py b/dc_rest/models/application_command_option_string_choice.py new file mode 100644 index 0000000..b4d436e --- /dev/null +++ b/dc_rest/models/application_command_option_string_choice.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionStringChoice(BaseModel): + """ + ApplicationCommandOptionStringChoice + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + value: Annotated[str, Field(strict=True, max_length=6000)] + __properties: ClassVar[List[str]] = ["name", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionStringChoice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionStringChoice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionStringChoice) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_option_string_choice_response.py b/dc_rest/models/application_command_option_string_choice_response.py new file mode 100644 index 0000000..268ad7b --- /dev/null +++ b/dc_rest/models/application_command_option_string_choice_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandOptionStringChoiceResponse(BaseModel): + """ + ApplicationCommandOptionStringChoiceResponse + """ # noqa: E501 + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + value: StrictStr + __properties: ClassVar[List[str]] = ["name", "name_localized", "name_localizations", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionStringChoiceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandOptionStringChoiceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandOptionStringChoiceResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "value": obj.get("value") + }) + return _obj + + diff --git a/dc_rest/models/application_command_patch_request_partial.py b/dc_rest/models/application_command_patch_request_partial.py new file mode 100644 index 0000000..a5309d7 --- /dev/null +++ b/dc_rest/models/application_command_patch_request_partial.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandPatchRequestPartial(BaseModel): + """ + ApplicationCommandPatchRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=32)]] = None + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None + default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None + dm_permission: Optional[StrictBool] = None + contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + handler: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + # set to None if default_member_permissions (nullable) is None + # and model_fields_set contains the field + if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set: + _dict['default_member_permissions'] = None + + # set to None if dm_permission (nullable) is None + # and model_fields_set contains the field + if self.dm_permission is None and "dm_permission" in self.model_fields_set: + _dict['dm_permission'] = None + + # set to None if contexts (nullable) is None + # and model_fields_set contains the field + if self.contexts is None and "contexts" in self.model_fields_set: + _dict['contexts'] = None + + # set to None if integration_types (nullable) is None + # and model_fields_set contains the field + if self.integration_types is None and "integration_types" in self.model_fields_set: + _dict['integration_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "default_member_permissions": obj.get("default_member_permissions"), + "dm_permission": obj.get("dm_permission"), + "contexts": obj.get("contexts"), + "integration_types": obj.get("integration_types"), + "handler": obj.get("handler") + }) + return _obj + + diff --git a/dc_rest/models/application_command_permission.py b/dc_rest/models/application_command_permission.py new file mode 100644 index 0000000..1adc23a --- /dev/null +++ b/dc_rest/models/application_command_permission.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandPermission(BaseModel): + """ + ApplicationCommandPermission + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + permission: StrictBool + __properties: ClassVar[List[str]] = ["id", "type", "permission"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandPermission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandPermission) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "permission": obj.get("permission") + }) + return _obj + + diff --git a/dc_rest/models/application_command_response.py b/dc_rest/models/application_command_response.py new file mode 100644 index 0000000..9dbacfd --- /dev/null +++ b/dc_rest/models/application_command_response.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandResponse(BaseModel): + """ + ApplicationCommandResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + application_id: Annotated[str, Field(strict=True)] + version: Annotated[str, Field(strict=True)] + default_member_permissions: Optional[StrictStr] = None + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + dm_permission: Optional[StrictBool] = None + contexts: Optional[List[StrictInt]] = None + integration_types: Optional[List[StrictInt]] = None + options: Optional[List[ApplicationCommandResponseOptionsInner]] = None + nsfw: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "application_id", "version", "default_member_permissions", "type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "guild_id", "dm_permission", "contexts", "integration_types", "options", "nsfw"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('version') + def version_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if default_member_permissions (nullable) is None + # and model_fields_set contains the field + if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set: + _dict['default_member_permissions'] = None + + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if dm_permission (nullable) is None + # and model_fields_set contains the field + if self.dm_permission is None and "dm_permission" in self.model_fields_set: + _dict['dm_permission'] = None + + # set to None if contexts (nullable) is None + # and model_fields_set contains the field + if self.contexts is None and "contexts" in self.model_fields_set: + _dict['contexts'] = None + + # set to None if integration_types (nullable) is None + # and model_fields_set contains the field + if self.integration_types is None and "integration_types" in self.model_fields_set: + _dict['integration_types'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "application_id": obj.get("application_id"), + "version": obj.get("version"), + "default_member_permissions": obj.get("default_member_permissions"), + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "guild_id": obj.get("guild_id"), + "dm_permission": obj.get("dm_permission"), + "contexts": obj.get("contexts"), + "integration_types": obj.get("integration_types"), + "options": [ApplicationCommandResponseOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "nsfw": obj.get("nsfw") + }) + return _obj + + diff --git a/dc_rest/models/application_command_response_options_inner.py b/dc_rest/models/application_command_response_options_inner.py new file mode 100644 index 0000000..c7024a6 --- /dev/null +++ b/dc_rest/models/application_command_response_options_inner.py @@ -0,0 +1,297 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse +from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APPLICATIONCOMMANDRESPONSEOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandSubcommandGroupOptionResponse", "ApplicationCommandSubcommandOptionResponse", "ApplicationCommandUserOptionResponse"] + +class ApplicationCommandResponseOptionsInner(BaseModel): + """ + ApplicationCommandResponseOptionsInner + """ + # data type: ApplicationCommandAttachmentOptionResponse + oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOptionResponse] = None + # data type: ApplicationCommandBooleanOptionResponse + oneof_schema_2_validator: Optional[ApplicationCommandBooleanOptionResponse] = None + # data type: ApplicationCommandChannelOptionResponse + oneof_schema_3_validator: Optional[ApplicationCommandChannelOptionResponse] = None + # data type: ApplicationCommandIntegerOptionResponse + oneof_schema_4_validator: Optional[ApplicationCommandIntegerOptionResponse] = None + # data type: ApplicationCommandMentionableOptionResponse + oneof_schema_5_validator: Optional[ApplicationCommandMentionableOptionResponse] = None + # data type: ApplicationCommandNumberOptionResponse + oneof_schema_6_validator: Optional[ApplicationCommandNumberOptionResponse] = None + # data type: ApplicationCommandRoleOptionResponse + oneof_schema_7_validator: Optional[ApplicationCommandRoleOptionResponse] = None + # data type: ApplicationCommandStringOptionResponse + oneof_schema_8_validator: Optional[ApplicationCommandStringOptionResponse] = None + # data type: ApplicationCommandSubcommandGroupOptionResponse + oneof_schema_9_validator: Optional[ApplicationCommandSubcommandGroupOptionResponse] = None + # data type: ApplicationCommandSubcommandOptionResponse + oneof_schema_10_validator: Optional[ApplicationCommandSubcommandOptionResponse] = None + # data type: ApplicationCommandUserOptionResponse + oneof_schema_11_validator: Optional[ApplicationCommandUserOptionResponse] = None + actual_instance: Optional[Union[ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse]] = None + one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandSubcommandGroupOptionResponse", "ApplicationCommandSubcommandOptionResponse", "ApplicationCommandUserOptionResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApplicationCommandResponseOptionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandAttachmentOptionResponse + if not isinstance(v, ApplicationCommandAttachmentOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandBooleanOptionResponse + if not isinstance(v, ApplicationCommandBooleanOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandChannelOptionResponse + if not isinstance(v, ApplicationCommandChannelOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandIntegerOptionResponse + if not isinstance(v, ApplicationCommandIntegerOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandMentionableOptionResponse + if not isinstance(v, ApplicationCommandMentionableOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandNumberOptionResponse + if not isinstance(v, ApplicationCommandNumberOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandRoleOptionResponse + if not isinstance(v, ApplicationCommandRoleOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandStringOptionResponse + if not isinstance(v, ApplicationCommandStringOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandSubcommandGroupOptionResponse + if not isinstance(v, ApplicationCommandSubcommandGroupOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandGroupOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandSubcommandOptionResponse + if not isinstance(v, ApplicationCommandSubcommandOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandSubcommandOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandUserOptionResponse + if not isinstance(v, ApplicationCommandUserOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOptionResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandAttachmentOptionResponse + try: + instance.actual_instance = ApplicationCommandAttachmentOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandBooleanOptionResponse + try: + instance.actual_instance = ApplicationCommandBooleanOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandChannelOptionResponse + try: + instance.actual_instance = ApplicationCommandChannelOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandIntegerOptionResponse + try: + instance.actual_instance = ApplicationCommandIntegerOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandMentionableOptionResponse + try: + instance.actual_instance = ApplicationCommandMentionableOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandNumberOptionResponse + try: + instance.actual_instance = ApplicationCommandNumberOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandRoleOptionResponse + try: + instance.actual_instance = ApplicationCommandRoleOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandStringOptionResponse + try: + instance.actual_instance = ApplicationCommandStringOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandSubcommandGroupOptionResponse + try: + instance.actual_instance = ApplicationCommandSubcommandGroupOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandSubcommandOptionResponse + try: + instance.actual_instance = ApplicationCommandSubcommandOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandUserOptionResponse + try: + instance.actual_instance = ApplicationCommandUserOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationCommandResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandSubcommandGroupOptionResponse, ApplicationCommandSubcommandOptionResponse, ApplicationCommandUserOptionResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_command_role_option.py b/dc_rest/models/application_command_role_option.py new file mode 100644 index 0000000..4bbc41e --- /dev/null +++ b/dc_rest/models/application_command_role_option.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandRoleOption(BaseModel): + """ + ApplicationCommandRoleOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandRoleOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandRoleOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandRoleOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_role_option_response.py b/dc_rest/models/application_command_role_option_response.py new file mode 100644 index 0000000..188b4d4 --- /dev/null +++ b/dc_rest/models/application_command_role_option_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandRoleOptionResponse(BaseModel): + """ + ApplicationCommandRoleOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandRoleOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandRoleOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandRoleOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_string_option.py b/dc_rest/models/application_command_string_option.py new file mode 100644 index 0000000..3036472 --- /dev/null +++ b/dc_rest/models/application_command_string_option.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandStringOption(BaseModel): + """ + ApplicationCommandStringOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + min_length: Optional[Annotated[int, Field(le=6000, strict=True, ge=0)]] = None + max_length: Optional[Annotated[int, Field(le=6000, strict=True, ge=1)]] = None + choices: Optional[Annotated[List[ApplicationCommandOptionStringChoice], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "autocomplete", "min_length", "max_length", "choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandStringOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['min_length'] = None + + # set to None if max_length (nullable) is None + # and model_fields_set contains the field + if self.max_length is None and "max_length" in self.model_fields_set: + _dict['max_length'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandStringOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandStringOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "min_length": obj.get("min_length"), + "max_length": obj.get("max_length"), + "choices": [ApplicationCommandOptionStringChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_string_option_response.py b/dc_rest/models/application_command_string_option_response.py new file mode 100644 index 0000000..268f582 --- /dev/null +++ b/dc_rest/models/application_command_string_option_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandStringOptionResponse(BaseModel): + """ + ApplicationCommandStringOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + autocomplete: Optional[StrictBool] = None + choices: Optional[List[ApplicationCommandOptionStringChoiceResponse]] = None + min_length: Optional[StrictInt] = None + max_length: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "autocomplete", "choices", "min_length", "max_length"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandStringOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if autocomplete (nullable) is None + # and model_fields_set contains the field + if self.autocomplete is None and "autocomplete" in self.model_fields_set: + _dict['autocomplete'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['min_length'] = None + + # set to None if max_length (nullable) is None + # and model_fields_set contains the field + if self.max_length is None and "max_length" in self.model_fields_set: + _dict['max_length'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandStringOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandStringOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "autocomplete": obj.get("autocomplete"), + "choices": [ApplicationCommandOptionStringChoiceResponse.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None, + "min_length": obj.get("min_length"), + "max_length": obj.get("max_length") + }) + return _obj + + diff --git a/dc_rest/models/application_command_subcommand_group_option.py b/dc_rest/models/application_command_subcommand_group_option.py new file mode 100644 index 0000000..730de4f --- /dev/null +++ b/dc_rest/models/application_command_subcommand_group_option.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandSubcommandGroupOption(BaseModel): + """ + ApplicationCommandSubcommandGroupOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + options: Optional[Annotated[List[ApplicationCommandSubcommandOption], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandGroupOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandGroupOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandGroupOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "options": [ApplicationCommandSubcommandOption.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_subcommand_group_option_response.py b/dc_rest/models/application_command_subcommand_group_option_response.py new file mode 100644 index 0000000..6394eca --- /dev/null +++ b/dc_rest/models/application_command_subcommand_group_option_response.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandSubcommandGroupOptionResponse(BaseModel): + """ + ApplicationCommandSubcommandGroupOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + options: Optional[List[ApplicationCommandSubcommandOptionResponse]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandGroupOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandGroupOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandGroupOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "options": [ApplicationCommandSubcommandOptionResponse.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_subcommand_option.py b/dc_rest/models/application_command_subcommand_option.py new file mode 100644 index 0000000..6a923c1 --- /dev/null +++ b/dc_rest/models/application_command_subcommand_option.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandSubcommandOption(BaseModel): + """ + ApplicationCommandSubcommandOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + options: Optional[Annotated[List[ApplicationCommandSubcommandOptionOptionsInner], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "options": [ApplicationCommandSubcommandOptionOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_subcommand_option_options_inner.py b/dc_rest/models/application_command_subcommand_option_options_inner.py new file mode 100644 index 0000000..81a9593 --- /dev/null +++ b/dc_rest/models/application_command_subcommand_option_options_inner.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APPLICATIONCOMMANDSUBCOMMANDOPTIONOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandUserOption"] + +class ApplicationCommandSubcommandOptionOptionsInner(BaseModel): + """ + ApplicationCommandSubcommandOptionOptionsInner + """ + # data type: ApplicationCommandAttachmentOption + oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOption] = None + # data type: ApplicationCommandBooleanOption + oneof_schema_2_validator: Optional[ApplicationCommandBooleanOption] = None + # data type: ApplicationCommandChannelOption + oneof_schema_3_validator: Optional[ApplicationCommandChannelOption] = None + # data type: ApplicationCommandIntegerOption + oneof_schema_4_validator: Optional[ApplicationCommandIntegerOption] = None + # data type: ApplicationCommandMentionableOption + oneof_schema_5_validator: Optional[ApplicationCommandMentionableOption] = None + # data type: ApplicationCommandNumberOption + oneof_schema_6_validator: Optional[ApplicationCommandNumberOption] = None + # data type: ApplicationCommandRoleOption + oneof_schema_7_validator: Optional[ApplicationCommandRoleOption] = None + # data type: ApplicationCommandStringOption + oneof_schema_8_validator: Optional[ApplicationCommandStringOption] = None + # data type: ApplicationCommandUserOption + oneof_schema_9_validator: Optional[ApplicationCommandUserOption] = None + actual_instance: Optional[Union[ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption]] = None + one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOption", "ApplicationCommandBooleanOption", "ApplicationCommandChannelOption", "ApplicationCommandIntegerOption", "ApplicationCommandMentionableOption", "ApplicationCommandNumberOption", "ApplicationCommandRoleOption", "ApplicationCommandStringOption", "ApplicationCommandUserOption" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApplicationCommandSubcommandOptionOptionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandAttachmentOption + if not isinstance(v, ApplicationCommandAttachmentOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOption`") + else: + match += 1 + # validate data type: ApplicationCommandBooleanOption + if not isinstance(v, ApplicationCommandBooleanOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOption`") + else: + match += 1 + # validate data type: ApplicationCommandChannelOption + if not isinstance(v, ApplicationCommandChannelOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOption`") + else: + match += 1 + # validate data type: ApplicationCommandIntegerOption + if not isinstance(v, ApplicationCommandIntegerOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOption`") + else: + match += 1 + # validate data type: ApplicationCommandMentionableOption + if not isinstance(v, ApplicationCommandMentionableOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOption`") + else: + match += 1 + # validate data type: ApplicationCommandNumberOption + if not isinstance(v, ApplicationCommandNumberOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOption`") + else: + match += 1 + # validate data type: ApplicationCommandRoleOption + if not isinstance(v, ApplicationCommandRoleOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOption`") + else: + match += 1 + # validate data type: ApplicationCommandStringOption + if not isinstance(v, ApplicationCommandStringOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOption`") + else: + match += 1 + # validate data type: ApplicationCommandUserOption + if not isinstance(v, ApplicationCommandUserOption): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOption`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandAttachmentOption + try: + instance.actual_instance = ApplicationCommandAttachmentOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandBooleanOption + try: + instance.actual_instance = ApplicationCommandBooleanOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandChannelOption + try: + instance.actual_instance = ApplicationCommandChannelOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandIntegerOption + try: + instance.actual_instance = ApplicationCommandIntegerOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandMentionableOption + try: + instance.actual_instance = ApplicationCommandMentionableOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandNumberOption + try: + instance.actual_instance = ApplicationCommandNumberOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandRoleOption + try: + instance.actual_instance = ApplicationCommandRoleOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandStringOption + try: + instance.actual_instance = ApplicationCommandStringOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandUserOption + try: + instance.actual_instance = ApplicationCommandUserOption.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationCommandSubcommandOptionOptionsInner with oneOf schemas: ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOption, ApplicationCommandBooleanOption, ApplicationCommandChannelOption, ApplicationCommandIntegerOption, ApplicationCommandMentionableOption, ApplicationCommandNumberOption, ApplicationCommandRoleOption, ApplicationCommandStringOption, ApplicationCommandUserOption]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_command_subcommand_option_response.py b/dc_rest/models/application_command_subcommand_option_response.py new file mode 100644 index 0000000..ad40c6b --- /dev/null +++ b/dc_rest/models/application_command_subcommand_option_response.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandSubcommandOptionResponse(BaseModel): + """ + ApplicationCommandSubcommandOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + options: Optional[List[ApplicationCommandSubcommandOptionResponseOptionsInner]] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandSubcommandOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandSubcommandOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required"), + "options": [ApplicationCommandSubcommandOptionResponseOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_command_subcommand_option_response_options_inner.py b/dc_rest/models/application_command_subcommand_option_response_options_inner.py new file mode 100644 index 0000000..a05eedd --- /dev/null +++ b/dc_rest/models/application_command_subcommand_option_response_options_inner.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APPLICATIONCOMMANDSUBCOMMANDOPTIONRESPONSEOPTIONSINNER_ONE_OF_SCHEMAS = ["ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandUserOptionResponse"] + +class ApplicationCommandSubcommandOptionResponseOptionsInner(BaseModel): + """ + ApplicationCommandSubcommandOptionResponseOptionsInner + """ + # data type: ApplicationCommandAttachmentOptionResponse + oneof_schema_1_validator: Optional[ApplicationCommandAttachmentOptionResponse] = None + # data type: ApplicationCommandBooleanOptionResponse + oneof_schema_2_validator: Optional[ApplicationCommandBooleanOptionResponse] = None + # data type: ApplicationCommandChannelOptionResponse + oneof_schema_3_validator: Optional[ApplicationCommandChannelOptionResponse] = None + # data type: ApplicationCommandIntegerOptionResponse + oneof_schema_4_validator: Optional[ApplicationCommandIntegerOptionResponse] = None + # data type: ApplicationCommandMentionableOptionResponse + oneof_schema_5_validator: Optional[ApplicationCommandMentionableOptionResponse] = None + # data type: ApplicationCommandNumberOptionResponse + oneof_schema_6_validator: Optional[ApplicationCommandNumberOptionResponse] = None + # data type: ApplicationCommandRoleOptionResponse + oneof_schema_7_validator: Optional[ApplicationCommandRoleOptionResponse] = None + # data type: ApplicationCommandStringOptionResponse + oneof_schema_8_validator: Optional[ApplicationCommandStringOptionResponse] = None + # data type: ApplicationCommandUserOptionResponse + oneof_schema_9_validator: Optional[ApplicationCommandUserOptionResponse] = None + actual_instance: Optional[Union[ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse]] = None + one_of_schemas: Set[str] = { "ApplicationCommandAttachmentOptionResponse", "ApplicationCommandBooleanOptionResponse", "ApplicationCommandChannelOptionResponse", "ApplicationCommandIntegerOptionResponse", "ApplicationCommandMentionableOptionResponse", "ApplicationCommandNumberOptionResponse", "ApplicationCommandRoleOptionResponse", "ApplicationCommandStringOptionResponse", "ApplicationCommandUserOptionResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApplicationCommandSubcommandOptionResponseOptionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandAttachmentOptionResponse + if not isinstance(v, ApplicationCommandAttachmentOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAttachmentOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandBooleanOptionResponse + if not isinstance(v, ApplicationCommandBooleanOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandBooleanOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandChannelOptionResponse + if not isinstance(v, ApplicationCommandChannelOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandChannelOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandIntegerOptionResponse + if not isinstance(v, ApplicationCommandIntegerOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandIntegerOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandMentionableOptionResponse + if not isinstance(v, ApplicationCommandMentionableOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandMentionableOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandNumberOptionResponse + if not isinstance(v, ApplicationCommandNumberOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandNumberOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandRoleOptionResponse + if not isinstance(v, ApplicationCommandRoleOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandRoleOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandStringOptionResponse + if not isinstance(v, ApplicationCommandStringOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandStringOptionResponse`") + else: + match += 1 + # validate data type: ApplicationCommandUserOptionResponse + if not isinstance(v, ApplicationCommandUserOptionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandUserOptionResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandAttachmentOptionResponse + try: + instance.actual_instance = ApplicationCommandAttachmentOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandBooleanOptionResponse + try: + instance.actual_instance = ApplicationCommandBooleanOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandChannelOptionResponse + try: + instance.actual_instance = ApplicationCommandChannelOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandIntegerOptionResponse + try: + instance.actual_instance = ApplicationCommandIntegerOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandMentionableOptionResponse + try: + instance.actual_instance = ApplicationCommandMentionableOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandNumberOptionResponse + try: + instance.actual_instance = ApplicationCommandNumberOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandRoleOptionResponse + try: + instance.actual_instance = ApplicationCommandRoleOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandStringOptionResponse + try: + instance.actual_instance = ApplicationCommandStringOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ApplicationCommandUserOptionResponse + try: + instance.actual_instance = ApplicationCommandUserOptionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationCommandSubcommandOptionResponseOptionsInner with oneOf schemas: ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAttachmentOptionResponse, ApplicationCommandBooleanOptionResponse, ApplicationCommandChannelOptionResponse, ApplicationCommandIntegerOptionResponse, ApplicationCommandMentionableOptionResponse, ApplicationCommandNumberOptionResponse, ApplicationCommandRoleOptionResponse, ApplicationCommandStringOptionResponse, ApplicationCommandUserOptionResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_command_update_request.py b/dc_rest/models/application_command_update_request.py new file mode 100644 index 0000000..9710654 --- /dev/null +++ b/dc_rest/models/application_command_update_request.py @@ -0,0 +1,197 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandUpdateRequest(BaseModel): + """ + ApplicationCommandUpdateRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + options: Optional[Annotated[List[ApplicationCommandCreateRequestOptionsInner], Field(max_length=25)]] = None + default_member_permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None + dm_permission: Optional[StrictBool] = None + contexts: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + integration_types: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = None + handler: Optional[StrictInt] = None + type: Optional[StrictInt] = None + id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["name", "name_localizations", "description", "description_localizations", "options", "default_member_permissions", "dm_permission", "contexts", "integration_types", "handler", "type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if options (nullable) is None + # and model_fields_set contains the field + if self.options is None and "options" in self.model_fields_set: + _dict['options'] = None + + # set to None if default_member_permissions (nullable) is None + # and model_fields_set contains the field + if self.default_member_permissions is None and "default_member_permissions" in self.model_fields_set: + _dict['default_member_permissions'] = None + + # set to None if dm_permission (nullable) is None + # and model_fields_set contains the field + if self.dm_permission is None and "dm_permission" in self.model_fields_set: + _dict['dm_permission'] = None + + # set to None if contexts (nullable) is None + # and model_fields_set contains the field + if self.contexts is None and "contexts" in self.model_fields_set: + _dict['contexts'] = None + + # set to None if integration_types (nullable) is None + # and model_fields_set contains the field + if self.integration_types is None and "integration_types" in self.model_fields_set: + _dict['integration_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandUpdateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "options": [ApplicationCommandCreateRequestOptionsInner.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "default_member_permissions": obj.get("default_member_permissions"), + "dm_permission": obj.get("dm_permission"), + "contexts": obj.get("contexts"), + "integration_types": obj.get("integration_types"), + "handler": obj.get("handler"), + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/application_command_user_option.py b/dc_rest/models/application_command_user_option.py new file mode 100644 index 0000000..d5a06a5 --- /dev/null +++ b/dc_rest/models/application_command_user_option.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandUserOption(BaseModel): + """ + ApplicationCommandUserOption + """ # noqa: E501 + type: StrictInt + name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] + name_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=32)]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description_localizations: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localizations", "description", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandUserOption from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandUserOption from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandUserOption) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_command_user_option_response.py b/dc_rest/models/application_command_user_option_response.py new file mode 100644 index 0000000..14c5fe4 --- /dev/null +++ b/dc_rest/models/application_command_user_option_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationCommandUserOptionResponse(BaseModel): + """ + ApplicationCommandUserOptionResponse + """ # noqa: E501 + type: StrictInt + name: StrictStr + name_localized: Optional[StrictStr] = None + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localized: Optional[StrictStr] = None + description_localizations: Optional[Dict[str, StrictStr]] = None + required: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "name_localized", "name_localizations", "description", "description_localized", "description_localizations", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationCommandUserOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + # set to None if description_localized (nullable) is None + # and model_fields_set contains the field + if self.description_localized is None and "description_localized" in self.model_fields_set: + _dict['description_localized'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationCommandUserOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationCommandUserOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "name_localized": obj.get("name_localized"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localized": obj.get("description_localized"), + "description_localizations": obj.get("description_localizations"), + "required": obj.get("required") + }) + return _obj + + diff --git a/dc_rest/models/application_form_partial.py b/dc_rest/models/application_form_partial.py new file mode 100644 index 0000000..619cc30 --- /dev/null +++ b/dc_rest/models/application_form_partial.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription +from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationFormPartial(BaseModel): + """ + ApplicationFormPartial + """ # noqa: E501 + description: Optional[ApplicationFormPartialDescription] = None + icon: Optional[StrictStr] = None + cover_image: Optional[StrictStr] = None + team_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: Optional[StrictInt] = None + interactions_endpoint_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + explicit_content_filter: Optional[StrictInt] = None + max_participants: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None + type: Optional[StrictInt] = None + tags: Optional[Annotated[List[Annotated[str, Field(strict=True, max_length=20)]], Field(max_length=5)]] = None + custom_install_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + install_params: Optional[ApplicationOAuth2InstallParams] = None + role_connections_verification_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + integration_types_config: Optional[Dict[str, Optional[ApplicationFormPartialIntegrationTypesConfigValue]]] = None + __properties: ClassVar[List[str]] = ["description", "icon", "cover_image", "team_id", "flags", "interactions_endpoint_url", "explicit_content_filter", "max_participants", "type", "tags", "custom_install_url", "install_params", "role_connections_verification_url", "integration_types_config"] + + @field_validator('team_id') + def team_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationFormPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of description + if self.description: + _dict['description'] = self.description.to_dict() + # override the default output from pydantic by calling `to_dict()` of install_params + if self.install_params: + _dict['install_params'] = self.install_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict) + _field_dict = {} + if self.integration_types_config: + for _key_integration_types_config in self.integration_types_config: + if self.integration_types_config[_key_integration_types_config]: + _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict() + _dict['integration_types_config'] = _field_dict + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if interactions_endpoint_url (nullable) is None + # and model_fields_set contains the field + if self.interactions_endpoint_url is None and "interactions_endpoint_url" in self.model_fields_set: + _dict['interactions_endpoint_url'] = None + + # set to None if max_participants (nullable) is None + # and model_fields_set contains the field + if self.max_participants is None and "max_participants" in self.model_fields_set: + _dict['max_participants'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + # set to None if custom_install_url (nullable) is None + # and model_fields_set contains the field + if self.custom_install_url is None and "custom_install_url" in self.model_fields_set: + _dict['custom_install_url'] = None + + # set to None if install_params (nullable) is None + # and model_fields_set contains the field + if self.install_params is None and "install_params" in self.model_fields_set: + _dict['install_params'] = None + + # set to None if role_connections_verification_url (nullable) is None + # and model_fields_set contains the field + if self.role_connections_verification_url is None and "role_connections_verification_url" in self.model_fields_set: + _dict['role_connections_verification_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationFormPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationFormPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "description": ApplicationFormPartialDescription.from_dict(obj["description"]) if obj.get("description") is not None else None, + "icon": obj.get("icon"), + "cover_image": obj.get("cover_image"), + "team_id": obj.get("team_id"), + "flags": obj.get("flags"), + "interactions_endpoint_url": obj.get("interactions_endpoint_url"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "max_participants": obj.get("max_participants"), + "type": obj.get("type"), + "tags": obj.get("tags"), + "custom_install_url": obj.get("custom_install_url"), + "install_params": ApplicationOAuth2InstallParams.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None, + "role_connections_verification_url": obj.get("role_connections_verification_url"), + "integration_types_config": dict( + (_k, ApplicationFormPartialIntegrationTypesConfigValue.from_dict(_v)) + for _k, _v in obj["integration_types_config"].items() + ) + if obj.get("integration_types_config") is not None + else None + }) + return _obj + + diff --git a/dc_rest/models/application_form_partial_description.py b/dc_rest/models/application_form_partial_description.py new file mode 100644 index 0000000..3071c96 --- /dev/null +++ b/dc_rest/models/application_form_partial_description.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationFormPartialDescription(BaseModel): + """ + ApplicationFormPartialDescription + """ # noqa: E501 + default: Annotated[str, Field(strict=True, max_length=400)] + localizations: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=400)]]] = None + __properties: ClassVar[List[str]] = ["default", "localizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationFormPartialDescription from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationFormPartialDescription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationFormPartialDescription) in the input: " + _key) + + _obj = cls.model_validate({ + "default": obj.get("default"), + "localizations": obj.get("localizations") + }) + return _obj + + diff --git a/dc_rest/models/application_form_partial_integration_types_config_value.py b/dc_rest/models/application_form_partial_integration_types_config_value.py new file mode 100644 index 0000000..10c1eeb --- /dev/null +++ b/dc_rest/models/application_form_partial_integration_types_config_value.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APPLICATIONFORMPARTIALINTEGRATIONTYPESCONFIGVALUE_ONE_OF_SCHEMAS = ["ApplicationIntegrationTypeConfiguration"] + +class ApplicationFormPartialIntegrationTypesConfigValue(BaseModel): + """ + ApplicationFormPartialIntegrationTypesConfigValue + """ + # data type: ApplicationIntegrationTypeConfiguration + oneof_schema_1_validator: Optional[ApplicationIntegrationTypeConfiguration] = None + actual_instance: Optional[Union[ApplicationIntegrationTypeConfiguration]] = None + one_of_schemas: Set[str] = { "ApplicationIntegrationTypeConfiguration" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = ApplicationFormPartialIntegrationTypesConfigValue.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationIntegrationTypeConfiguration + if not isinstance(v, ApplicationIntegrationTypeConfiguration): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationIntegrationTypeConfiguration`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into ApplicationIntegrationTypeConfiguration + try: + instance.actual_instance = ApplicationIntegrationTypeConfiguration.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApplicationFormPartialIntegrationTypesConfigValue with oneOf schemas: ApplicationIntegrationTypeConfiguration. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationIntegrationTypeConfiguration]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/application_incoming_webhook_response.py b/dc_rest/models/application_incoming_webhook_response.py new file mode 100644 index 0000000..18b5708 --- /dev/null +++ b/dc_rest/models/application_incoming_webhook_response.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationIncomingWebhookResponse(BaseModel): + """ + ApplicationIncomingWebhookResponse + """ # noqa: E501 + application_id: Optional[Annotated[str, Field(strict=True)]] = None + avatar: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + id: Annotated[str, Field(strict=True)] + name: StrictStr + type: StrictInt + user: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user"] + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationIncomingWebhookResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationIncomingWebhookResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationIncomingWebhookResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "application_id": obj.get("application_id"), + "avatar": obj.get("avatar"), + "channel_id": obj.get("channel_id"), + "guild_id": obj.get("guild_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_integration_type_configuration.py b/dc_rest/models/application_integration_type_configuration.py new file mode 100644 index 0000000..d974030 --- /dev/null +++ b/dc_rest/models/application_integration_type_configuration.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationIntegrationTypeConfiguration(BaseModel): + """ + ApplicationIntegrationTypeConfiguration + """ # noqa: E501 + oauth2_install_params: Optional[ApplicationOAuth2InstallParams] = None + __properties: ClassVar[List[str]] = ["oauth2_install_params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationIntegrationTypeConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth2_install_params + if self.oauth2_install_params: + _dict['oauth2_install_params'] = self.oauth2_install_params.to_dict() + # set to None if oauth2_install_params (nullable) is None + # and model_fields_set contains the field + if self.oauth2_install_params is None and "oauth2_install_params" in self.model_fields_set: + _dict['oauth2_install_params'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationIntegrationTypeConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationIntegrationTypeConfiguration) in the input: " + _key) + + _obj = cls.model_validate({ + "oauth2_install_params": ApplicationOAuth2InstallParams.from_dict(obj["oauth2_install_params"]) if obj.get("oauth2_install_params") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_integration_type_configuration_response.py b/dc_rest/models/application_integration_type_configuration_response.py new file mode 100644 index 0000000..f36ab26 --- /dev/null +++ b/dc_rest/models/application_integration_type_configuration_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationIntegrationTypeConfigurationResponse(BaseModel): + """ + ApplicationIntegrationTypeConfigurationResponse + """ # noqa: E501 + oauth2_install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None + __properties: ClassVar[List[str]] = ["oauth2_install_params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationIntegrationTypeConfigurationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth2_install_params + if self.oauth2_install_params: + _dict['oauth2_install_params'] = self.oauth2_install_params.to_dict() + # set to None if oauth2_install_params (nullable) is None + # and model_fields_set contains the field + if self.oauth2_install_params is None and "oauth2_install_params" in self.model_fields_set: + _dict['oauth2_install_params'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationIntegrationTypeConfigurationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationIntegrationTypeConfigurationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "oauth2_install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["oauth2_install_params"]) if obj.get("oauth2_install_params") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/application_o_auth2_install_params.py b/dc_rest/models/application_o_auth2_install_params.py new file mode 100644 index 0000000..e220166 --- /dev/null +++ b/dc_rest/models/application_o_auth2_install_params.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationOAuth2InstallParams(BaseModel): + """ + ApplicationOAuth2InstallParams + """ # noqa: E501 + scopes: Optional[Annotated[List[StrictStr], Field(min_length=1)]] = None + permissions: Optional[Annotated[int, Field(le=4503599627370495, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["scopes", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationOAuth2InstallParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if scopes (nullable) is None + # and model_fields_set contains the field + if self.scopes is None and "scopes" in self.model_fields_set: + _dict['scopes'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationOAuth2InstallParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationOAuth2InstallParams) in the input: " + _key) + + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/dc_rest/models/application_o_auth2_install_params_response.py b/dc_rest/models/application_o_auth2_install_params_response.py new file mode 100644 index 0000000..8e8c45b --- /dev/null +++ b/dc_rest/models/application_o_auth2_install_params_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationOAuth2InstallParamsResponse(BaseModel): + """ + ApplicationOAuth2InstallParamsResponse + """ # noqa: E501 + scopes: List[StrictStr] + permissions: StrictStr + __properties: ClassVar[List[str]] = ["scopes", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationOAuth2InstallParamsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationOAuth2InstallParamsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationOAuth2InstallParamsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/dc_rest/models/application_response.py b/dc_rest/models/application_response.py new file mode 100644 index 0000000..d0a9b00 --- /dev/null +++ b/dc_rest/models/application_response.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationResponse(BaseModel): + """ + ApplicationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: StrictStr + type: Optional[StrictInt] = None + cover_image: Optional[StrictStr] = None + primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None + bot: Optional[UserResponse] = None + slug: Optional[StrictStr] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + rpc_origins: Optional[List[Optional[StrictStr]]] = None + bot_public: Optional[StrictBool] = None + bot_require_code_grant: Optional[StrictBool] = None + terms_of_service_url: Optional[StrictStr] = None + privacy_policy_url: Optional[StrictStr] = None + custom_install_url: Optional[StrictStr] = None + install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None + integration_types_config: Optional[Dict[str, ApplicationIntegrationTypeConfigurationResponse]] = None + verify_key: StrictStr + flags: StrictInt + max_participants: Optional[StrictInt] = None + tags: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot", "slug", "guild_id", "rpc_origins", "bot_public", "bot_require_code_grant", "terms_of_service_url", "privacy_policy_url", "custom_install_url", "install_params", "integration_types_config", "verify_key", "flags", "max_participants", "tags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('primary_sku_id') + def primary_sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bot + if self.bot: + _dict['bot'] = self.bot.to_dict() + # override the default output from pydantic by calling `to_dict()` of install_params + if self.install_params: + _dict['install_params'] = self.install_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict) + _field_dict = {} + if self.integration_types_config: + for _key_integration_types_config in self.integration_types_config: + if self.integration_types_config[_key_integration_types_config]: + _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict() + _dict['integration_types_config'] = _field_dict + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + # set to None if slug (nullable) is None + # and model_fields_set contains the field + if self.slug is None and "slug" in self.model_fields_set: + _dict['slug'] = None + + # set to None if rpc_origins (nullable) is None + # and model_fields_set contains the field + if self.rpc_origins is None and "rpc_origins" in self.model_fields_set: + _dict['rpc_origins'] = None + + # set to None if bot_public (nullable) is None + # and model_fields_set contains the field + if self.bot_public is None and "bot_public" in self.model_fields_set: + _dict['bot_public'] = None + + # set to None if bot_require_code_grant (nullable) is None + # and model_fields_set contains the field + if self.bot_require_code_grant is None and "bot_require_code_grant" in self.model_fields_set: + _dict['bot_require_code_grant'] = None + + # set to None if terms_of_service_url (nullable) is None + # and model_fields_set contains the field + if self.terms_of_service_url is None and "terms_of_service_url" in self.model_fields_set: + _dict['terms_of_service_url'] = None + + # set to None if privacy_policy_url (nullable) is None + # and model_fields_set contains the field + if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set: + _dict['privacy_policy_url'] = None + + # set to None if custom_install_url (nullable) is None + # and model_fields_set contains the field + if self.custom_install_url is None and "custom_install_url" in self.model_fields_set: + _dict['custom_install_url'] = None + + # set to None if install_params (nullable) is None + # and model_fields_set contains the field + if self.install_params is None and "install_params" in self.model_fields_set: + _dict['install_params'] = None + + # set to None if max_participants (nullable) is None + # and model_fields_set contains the field + if self.max_participants is None and "max_participants" in self.model_fields_set: + _dict['max_participants'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "type": obj.get("type"), + "cover_image": obj.get("cover_image"), + "primary_sku_id": obj.get("primary_sku_id"), + "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None, + "slug": obj.get("slug"), + "guild_id": obj.get("guild_id"), + "rpc_origins": obj.get("rpc_origins"), + "bot_public": obj.get("bot_public"), + "bot_require_code_grant": obj.get("bot_require_code_grant"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "custom_install_url": obj.get("custom_install_url"), + "install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None, + "integration_types_config": dict( + (_k, ApplicationIntegrationTypeConfigurationResponse.from_dict(_v)) + for _k, _v in obj["integration_types_config"].items() + ) + if obj.get("integration_types_config") is not None + else None, + "verify_key": obj.get("verify_key"), + "flags": obj.get("flags"), + "max_participants": obj.get("max_participants"), + "tags": obj.get("tags") + }) + return _obj + + diff --git a/dc_rest/models/application_role_connections_metadata_item_request.py b/dc_rest/models/application_role_connections_metadata_item_request.py new file mode 100644 index 0000000..55009ba --- /dev/null +++ b/dc_rest/models/application_role_connections_metadata_item_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationRoleConnectionsMetadataItemRequest(BaseModel): + """ + ApplicationRoleConnectionsMetadataItemRequest + """ # noqa: E501 + type: StrictInt + key: Annotated[str, Field(min_length=1, strict=True, max_length=50)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + name_localizations: Optional[Dict[str, Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]]]] = None + description: Annotated[str, Field(min_length=1, strict=True, max_length=200)] + description_localizations: Optional[Dict[str, Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]]] = None + __properties: ClassVar[List[str]] = ["type", "key", "name", "name_localizations", "description", "description_localizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationRoleConnectionsMetadataItemRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationRoleConnectionsMetadataItemRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationRoleConnectionsMetadataItemRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "key": obj.get("key"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations") + }) + return _obj + + diff --git a/dc_rest/models/application_role_connections_metadata_item_response.py b/dc_rest/models/application_role_connections_metadata_item_response.py new file mode 100644 index 0000000..f7ef945 --- /dev/null +++ b/dc_rest/models/application_role_connections_metadata_item_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationRoleConnectionsMetadataItemResponse(BaseModel): + """ + ApplicationRoleConnectionsMetadataItemResponse + """ # noqa: E501 + type: StrictInt + key: StrictStr + name: StrictStr + name_localizations: Optional[Dict[str, StrictStr]] = None + description: StrictStr + description_localizations: Optional[Dict[str, StrictStr]] = None + __properties: ClassVar[List[str]] = ["type", "key", "name", "name_localizations", "description", "description_localizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationRoleConnectionsMetadataItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationRoleConnectionsMetadataItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationRoleConnectionsMetadataItemResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "key": obj.get("key"), + "name": obj.get("name"), + "name_localizations": obj.get("name_localizations"), + "description": obj.get("description"), + "description_localizations": obj.get("description_localizations") + }) + return _obj + + diff --git a/dc_rest/models/application_user_role_connection_response.py b/dc_rest/models/application_user_role_connection_response.py new file mode 100644 index 0000000..2b5f2f7 --- /dev/null +++ b/dc_rest/models/application_user_role_connection_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationUserRoleConnectionResponse(BaseModel): + """ + ApplicationUserRoleConnectionResponse + """ # noqa: E501 + platform_name: Optional[StrictStr] = None + platform_username: Optional[StrictStr] = None + metadata: Optional[Dict[str, StrictStr]] = None + __properties: ClassVar[List[str]] = ["platform_name", "platform_username", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationUserRoleConnectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if platform_name (nullable) is None + # and model_fields_set contains the field + if self.platform_name is None and "platform_name" in self.model_fields_set: + _dict['platform_name'] = None + + # set to None if platform_username (nullable) is None + # and model_fields_set contains the field + if self.platform_username is None and "platform_username" in self.model_fields_set: + _dict['platform_username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationUserRoleConnectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ApplicationUserRoleConnectionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "platform_name": obj.get("platform_name"), + "platform_username": obj.get("platform_username"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/dc_rest/models/attachment_response.py b/dc_rest/models/attachment_response.py new file mode 100644 index 0000000..d9dd7fa --- /dev/null +++ b/dc_rest/models/attachment_response.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dc_rest.models.application_response import ApplicationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class AttachmentResponse(BaseModel): + """ + AttachmentResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + filename: StrictStr + size: StrictInt + url: StrictStr + proxy_url: StrictStr + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + duration_secs: Optional[Union[StrictFloat, StrictInt]] = None + waveform: Optional[StrictStr] = None + description: Optional[StrictStr] = None + content_type: Optional[StrictStr] = None + ephemeral: Optional[StrictBool] = None + title: Optional[StrictStr] = None + application: Optional[ApplicationResponse] = None + clip_created_at: Optional[datetime] = None + clip_participants: Optional[List[UserResponse]] = None + __properties: ClassVar[List[str]] = ["id", "filename", "size", "url", "proxy_url", "width", "height", "duration_secs", "waveform", "description", "content_type", "ephemeral", "title", "application", "clip_created_at", "clip_participants"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttachmentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in clip_participants (list) + _items = [] + if self.clip_participants: + for _item_clip_participants in self.clip_participants: + if _item_clip_participants: + _items.append(_item_clip_participants.to_dict()) + _dict['clip_participants'] = _items + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if duration_secs (nullable) is None + # and model_fields_set contains the field + if self.duration_secs is None and "duration_secs" in self.model_fields_set: + _dict['duration_secs'] = None + + # set to None if waveform (nullable) is None + # and model_fields_set contains the field + if self.waveform is None and "waveform" in self.model_fields_set: + _dict['waveform'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if ephemeral (nullable) is None + # and model_fields_set contains the field + if self.ephemeral is None and "ephemeral" in self.model_fields_set: + _dict['ephemeral'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if application (nullable) is None + # and model_fields_set contains the field + if self.application is None and "application" in self.model_fields_set: + _dict['application'] = None + + # set to None if clip_created_at (nullable) is None + # and model_fields_set contains the field + if self.clip_created_at is None and "clip_created_at" in self.model_fields_set: + _dict['clip_created_at'] = None + + # set to None if clip_participants (nullable) is None + # and model_fields_set contains the field + if self.clip_participants is None and "clip_participants" in self.model_fields_set: + _dict['clip_participants'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttachmentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AttachmentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "filename": obj.get("filename"), + "size": obj.get("size"), + "url": obj.get("url"), + "proxy_url": obj.get("proxy_url"), + "width": obj.get("width"), + "height": obj.get("height"), + "duration_secs": obj.get("duration_secs"), + "waveform": obj.get("waveform"), + "description": obj.get("description"), + "content_type": obj.get("content_type"), + "ephemeral": obj.get("ephemeral"), + "title": obj.get("title"), + "application": ApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "clip_created_at": obj.get("clip_created_at"), + "clip_participants": [UserResponse.from_dict(_item) for _item in obj["clip_participants"]] if obj.get("clip_participants") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/audit_log_entry_response.py b/dc_rest/models/audit_log_entry_response.py new file mode 100644 index 0000000..41df868 --- /dev/null +++ b/dc_rest/models/audit_log_entry_response.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse +from typing import Optional, Set +from typing_extensions import Self + +class AuditLogEntryResponse(BaseModel): + """ + AuditLogEntryResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + action_type: Optional[StrictInt] + user_id: Optional[Annotated[str, Field(strict=True)]] = None + target_id: Optional[Annotated[str, Field(strict=True)]] = None + changes: Optional[List[AuditLogObjectChangeResponse]] = None + options: Optional[Dict[str, StrictStr]] = None + reason: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "action_type", "user_id", "target_id", "changes", "options", "reason"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('user_id') + def user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('target_id') + def target_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditLogEntryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in changes (list) + _items = [] + if self.changes: + for _item_changes in self.changes: + if _item_changes: + _items.append(_item_changes.to_dict()) + _dict['changes'] = _items + # set to None if action_type (nullable) is None + # and model_fields_set contains the field + if self.action_type is None and "action_type" in self.model_fields_set: + _dict['action_type'] = None + + # set to None if changes (nullable) is None + # and model_fields_set contains the field + if self.changes is None and "changes" in self.model_fields_set: + _dict['changes'] = None + + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditLogEntryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AuditLogEntryResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "action_type": obj.get("action_type"), + "user_id": obj.get("user_id"), + "target_id": obj.get("target_id"), + "changes": [AuditLogObjectChangeResponse.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None, + "options": obj.get("options"), + "reason": obj.get("reason") + }) + return _obj + + diff --git a/dc_rest/models/audit_log_object_change_response.py b/dc_rest/models/audit_log_object_change_response.py new file mode 100644 index 0000000..be51857 --- /dev/null +++ b/dc_rest/models/audit_log_object_change_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuditLogObjectChangeResponse(BaseModel): + """ + AuditLogObjectChangeResponse + """ # noqa: E501 + key: Optional[StrictStr] = None + new_value: Optional[Any] = None + old_value: Optional[Any] = None + __properties: ClassVar[List[str]] = ["key", "new_value", "old_value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditLogObjectChangeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + + # set to None if new_value (nullable) is None + # and model_fields_set contains the field + if self.new_value is None and "new_value" in self.model_fields_set: + _dict['new_value'] = None + + # set to None if old_value (nullable) is None + # and model_fields_set contains the field + if self.old_value is None and "old_value" in self.model_fields_set: + _dict['old_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditLogObjectChangeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in AuditLogObjectChangeResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "new_value": obj.get("new_value"), + "old_value": obj.get("old_value") + }) + return _obj + + diff --git a/dc_rest/models/ban_user_from_guild_request.py b/dc_rest/models/ban_user_from_guild_request.py new file mode 100644 index 0000000..081e3df --- /dev/null +++ b/dc_rest/models/ban_user_from_guild_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BanUserFromGuildRequest(BaseModel): + """ + BanUserFromGuildRequest + """ # noqa: E501 + delete_message_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None + delete_message_days: Optional[Annotated[int, Field(le=7, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["delete_message_seconds", "delete_message_days"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BanUserFromGuildRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if delete_message_seconds (nullable) is None + # and model_fields_set contains the field + if self.delete_message_seconds is None and "delete_message_seconds" in self.model_fields_set: + _dict['delete_message_seconds'] = None + + # set to None if delete_message_days (nullable) is None + # and model_fields_set contains the field + if self.delete_message_days is None and "delete_message_days" in self.model_fields_set: + _dict['delete_message_days'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BanUserFromGuildRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BanUserFromGuildRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "delete_message_seconds": obj.get("delete_message_seconds"), + "delete_message_days": obj.get("delete_message_days") + }) + return _obj + + diff --git a/dc_rest/models/base_create_message_create_request.py b/dc_rest/models/base_create_message_create_request.py new file mode 100644 index 0000000..af652d6 --- /dev/null +++ b/dc_rest/models/base_create_message_create_request.py @@ -0,0 +1,215 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class BaseCreateMessageCreateRequest(BaseModel): + """ + BaseCreateMessageCreateRequest + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + sticker_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + flags: Optional[StrictInt] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + confetti_potion: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "sticker_ids", "components", "flags", "attachments", "poll", "confetti_potion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseCreateMessageCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if sticker_ids (nullable) is None + # and model_fields_set contains the field + if self.sticker_ids is None and "sticker_ids" in self.model_fields_set: + _dict['sticker_ids'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseCreateMessageCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BaseCreateMessageCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "sticker_ids": obj.get("sticker_ids"), + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "flags": obj.get("flags"), + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "confetti_potion": obj.get("confetti_potion") + }) + return _obj + + diff --git a/dc_rest/models/base_create_message_create_request_components_inner.py b/dc_rest/models/base_create_message_create_request_components_inner.py new file mode 100644 index 0000000..83aad18 --- /dev/null +++ b/dc_rest/models/base_create_message_create_request_components_inner.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest +from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BASECREATEMESSAGECREATEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentForMessageRequest", "ContainerComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest"] + +class BaseCreateMessageCreateRequestComponentsInner(BaseModel): + """ + BaseCreateMessageCreateRequestComponentsInner + """ + # data type: ActionRowComponentForMessageRequest + oneof_schema_1_validator: Optional[ActionRowComponentForMessageRequest] = None + # data type: ContainerComponentForMessageRequest + oneof_schema_2_validator: Optional[ContainerComponentForMessageRequest] = None + # data type: FileComponentForMessageRequest + oneof_schema_3_validator: Optional[FileComponentForMessageRequest] = None + # data type: MediaGalleryComponentForMessageRequest + oneof_schema_4_validator: Optional[MediaGalleryComponentForMessageRequest] = None + # data type: SectionComponentForMessageRequest + oneof_schema_5_validator: Optional[SectionComponentForMessageRequest] = None + # data type: SeparatorComponentForMessageRequest + oneof_schema_6_validator: Optional[SeparatorComponentForMessageRequest] = None + # data type: TextDisplayComponentForMessageRequest + oneof_schema_7_validator: Optional[TextDisplayComponentForMessageRequest] = None + actual_instance: Optional[Union[ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]] = None + one_of_schemas: Set[str] = { "ActionRowComponentForMessageRequest", "ContainerComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BaseCreateMessageCreateRequestComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ActionRowComponentForMessageRequest + if not isinstance(v, ActionRowComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentForMessageRequest`") + else: + match += 1 + # validate data type: ContainerComponentForMessageRequest + if not isinstance(v, ContainerComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ContainerComponentForMessageRequest`") + else: + match += 1 + # validate data type: FileComponentForMessageRequest + if not isinstance(v, FileComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentForMessageRequest`") + else: + match += 1 + # validate data type: MediaGalleryComponentForMessageRequest + if not isinstance(v, MediaGalleryComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentForMessageRequest`") + else: + match += 1 + # validate data type: SectionComponentForMessageRequest + if not isinstance(v, SectionComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentForMessageRequest`") + else: + match += 1 + # validate data type: SeparatorComponentForMessageRequest + if not isinstance(v, SeparatorComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentForMessageRequest`") + else: + match += 1 + # validate data type: TextDisplayComponentForMessageRequest + if not isinstance(v, TextDisplayComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentForMessageRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ActionRowComponentForMessageRequest + try: + instance.actual_instance = ActionRowComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ContainerComponentForMessageRequest + try: + instance.actual_instance = ContainerComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FileComponentForMessageRequest + try: + instance.actual_instance = FileComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MediaGalleryComponentForMessageRequest + try: + instance.actual_instance = MediaGalleryComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SectionComponentForMessageRequest + try: + instance.actual_instance = SectionComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SeparatorComponentForMessageRequest + try: + instance.actual_instance = SeparatorComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextDisplayComponentForMessageRequest + try: + instance.actual_instance = TextDisplayComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BaseCreateMessageCreateRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentForMessageRequest, ContainerComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/basic_application_response.py b/dc_rest/models/basic_application_response.py new file mode 100644 index 0000000..e311648 --- /dev/null +++ b/dc_rest/models/basic_application_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class BasicApplicationResponse(BaseModel): + """ + BasicApplicationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: StrictStr + type: Optional[StrictInt] = None + cover_image: Optional[StrictStr] = None + primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None + bot: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('primary_sku_id') + def primary_sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BasicApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bot + if self.bot: + _dict['bot'] = self.bot.to_dict() + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BasicApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BasicApplicationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "type": obj.get("type"), + "cover_image": obj.get("cover_image"), + "primary_sku_id": obj.get("primary_sku_id"), + "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/basic_message_response.py b/dc_rest/models/basic_message_response.py new file mode 100644 index 0000000..a2f9999 --- /dev/null +++ b/dc_rest/models/basic_message_response.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.basic_application_response import BasicApplicationResponse +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.models.message_attachment_response import MessageAttachmentResponse +from dc_rest.models.message_call_response import MessageCallResponse +from dc_rest.models.message_embed_response import MessageEmbedResponse +from dc_rest.models.message_interaction_response import MessageInteractionResponse +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse +from dc_rest.models.message_reference_response import MessageReferenceResponse +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse +from dc_rest.models.poll_response import PollResponse +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class BasicMessageResponse(BaseModel): + """ + BasicMessageResponse + """ # noqa: E501 + type: StrictInt + content: StrictStr + mentions: List[UserResponse] + mention_roles: List[Annotated[str, Field(strict=True)]] + attachments: List[MessageAttachmentResponse] + embeds: List[MessageEmbedResponse] + timestamp: datetime + edited_timestamp: Optional[datetime] = None + flags: StrictInt + components: List[BasicMessageResponseComponentsInner] + resolved: Optional[ResolvedObjectsResponse] = None + stickers: Optional[List[GetSticker200Response]] = None + sticker_items: Optional[List[MessageStickerItemResponse]] = None + id: Annotated[str, Field(strict=True)] + channel_id: Annotated[str, Field(strict=True)] + author: UserResponse + pinned: StrictBool + mention_everyone: StrictBool + tts: StrictBool + call: Optional[MessageCallResponse] = None + activity: Optional[Dict[str, Any]] = None + application: Optional[BasicApplicationResponse] = None + application_id: Optional[Annotated[str, Field(strict=True)]] = None + interaction: Optional[MessageInteractionResponse] = None + nonce: Optional[BasicMessageResponseNonce] = None + webhook_id: Optional[Annotated[str, Field(strict=True)]] = None + message_reference: Optional[MessageReferenceResponse] = None + thread: Optional[ThreadResponse] = None + mention_channels: Optional[List[Optional[MessageMentionChannelResponse]]] = None + role_subscription_data: Optional[MessageRoleSubscriptionDataResponse] = None + purchase_notification: Optional[PurchaseNotificationResponse] = None + position: Optional[StrictInt] = None + poll: Optional[PollResponse] = None + interaction_metadata: Optional[BasicMessageResponseInteractionMetadata] = None + message_snapshots: Optional[List[MessageSnapshotResponse]] = None + __properties: ClassVar[List[str]] = ["type", "content", "mentions", "mention_roles", "attachments", "embeds", "timestamp", "edited_timestamp", "flags", "components", "resolved", "stickers", "sticker_items", "id", "channel_id", "author", "pinned", "mention_everyone", "tts", "call", "activity", "application", "application_id", "interaction", "nonce", "webhook_id", "message_reference", "thread", "mention_channels", "role_subscription_data", "purchase_notification", "position", "poll", "interaction_metadata", "message_snapshots"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('webhook_id') + def webhook_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BasicMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mentions (list) + _items = [] + if self.mentions: + for _item_mentions in self.mentions: + if _item_mentions: + _items.append(_item_mentions.to_dict()) + _dict['mentions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of resolved + if self.resolved: + _dict['resolved'] = self.resolved.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in sticker_items (list) + _items = [] + if self.sticker_items: + for _item_sticker_items in self.sticker_items: + if _item_sticker_items: + _items.append(_item_sticker_items.to_dict()) + _dict['sticker_items'] = _items + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + # override the default output from pydantic by calling `to_dict()` of call + if self.call: + _dict['call'] = self.call.to_dict() + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of interaction + if self.interaction: + _dict['interaction'] = self.interaction.to_dict() + # override the default output from pydantic by calling `to_dict()` of nonce + if self.nonce: + _dict['nonce'] = self.nonce.to_dict() + # override the default output from pydantic by calling `to_dict()` of message_reference + if self.message_reference: + _dict['message_reference'] = self.message_reference.to_dict() + # override the default output from pydantic by calling `to_dict()` of thread + if self.thread: + _dict['thread'] = self.thread.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in mention_channels (list) + _items = [] + if self.mention_channels: + for _item_mention_channels in self.mention_channels: + if _item_mention_channels: + _items.append(_item_mention_channels.to_dict()) + _dict['mention_channels'] = _items + # override the default output from pydantic by calling `to_dict()` of role_subscription_data + if self.role_subscription_data: + _dict['role_subscription_data'] = self.role_subscription_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchase_notification + if self.purchase_notification: + _dict['purchase_notification'] = self.purchase_notification.to_dict() + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # override the default output from pydantic by calling `to_dict()` of interaction_metadata + if self.interaction_metadata: + _dict['interaction_metadata'] = self.interaction_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in message_snapshots (list) + _items = [] + if self.message_snapshots: + for _item_message_snapshots in self.message_snapshots: + if _item_message_snapshots: + _items.append(_item_message_snapshots.to_dict()) + _dict['message_snapshots'] = _items + # set to None if edited_timestamp (nullable) is None + # and model_fields_set contains the field + if self.edited_timestamp is None and "edited_timestamp" in self.model_fields_set: + _dict['edited_timestamp'] = None + + # set to None if resolved (nullable) is None + # and model_fields_set contains the field + if self.resolved is None and "resolved" in self.model_fields_set: + _dict['resolved'] = None + + # set to None if stickers (nullable) is None + # and model_fields_set contains the field + if self.stickers is None and "stickers" in self.model_fields_set: + _dict['stickers'] = None + + # set to None if sticker_items (nullable) is None + # and model_fields_set contains the field + if self.sticker_items is None and "sticker_items" in self.model_fields_set: + _dict['sticker_items'] = None + + # set to None if call (nullable) is None + # and model_fields_set contains the field + if self.call is None and "call" in self.model_fields_set: + _dict['call'] = None + + # set to None if application (nullable) is None + # and model_fields_set contains the field + if self.application is None and "application" in self.model_fields_set: + _dict['application'] = None + + # set to None if interaction (nullable) is None + # and model_fields_set contains the field + if self.interaction is None and "interaction" in self.model_fields_set: + _dict['interaction'] = None + + # set to None if nonce (nullable) is None + # and model_fields_set contains the field + if self.nonce is None and "nonce" in self.model_fields_set: + _dict['nonce'] = None + + # set to None if message_reference (nullable) is None + # and model_fields_set contains the field + if self.message_reference is None and "message_reference" in self.model_fields_set: + _dict['message_reference'] = None + + # set to None if thread (nullable) is None + # and model_fields_set contains the field + if self.thread is None and "thread" in self.model_fields_set: + _dict['thread'] = None + + # set to None if mention_channels (nullable) is None + # and model_fields_set contains the field + if self.mention_channels is None and "mention_channels" in self.model_fields_set: + _dict['mention_channels'] = None + + # set to None if role_subscription_data (nullable) is None + # and model_fields_set contains the field + if self.role_subscription_data is None and "role_subscription_data" in self.model_fields_set: + _dict['role_subscription_data'] = None + + # set to None if purchase_notification (nullable) is None + # and model_fields_set contains the field + if self.purchase_notification is None and "purchase_notification" in self.model_fields_set: + _dict['purchase_notification'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if interaction_metadata (nullable) is None + # and model_fields_set contains the field + if self.interaction_metadata is None and "interaction_metadata" in self.model_fields_set: + _dict['interaction_metadata'] = None + + # set to None if message_snapshots (nullable) is None + # and model_fields_set contains the field + if self.message_snapshots is None and "message_snapshots" in self.model_fields_set: + _dict['message_snapshots'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BasicMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BasicMessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "content": obj.get("content"), + "mentions": [UserResponse.from_dict(_item) for _item in obj["mentions"]] if obj.get("mentions") is not None else None, + "mention_roles": obj.get("mention_roles"), + "attachments": [MessageAttachmentResponse.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "embeds": [MessageEmbedResponse.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "timestamp": obj.get("timestamp"), + "edited_timestamp": obj.get("edited_timestamp"), + "flags": obj.get("flags"), + "components": [BasicMessageResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "resolved": ResolvedObjectsResponse.from_dict(obj["resolved"]) if obj.get("resolved") is not None else None, + "stickers": [GetSticker200Response.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None, + "sticker_items": [MessageStickerItemResponse.from_dict(_item) for _item in obj["sticker_items"]] if obj.get("sticker_items") is not None else None, + "id": obj.get("id"), + "channel_id": obj.get("channel_id"), + "author": UserResponse.from_dict(obj["author"]) if obj.get("author") is not None else None, + "pinned": obj.get("pinned"), + "mention_everyone": obj.get("mention_everyone"), + "tts": obj.get("tts"), + "call": MessageCallResponse.from_dict(obj["call"]) if obj.get("call") is not None else None, + "activity": obj.get("activity"), + "application": BasicApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "application_id": obj.get("application_id"), + "interaction": MessageInteractionResponse.from_dict(obj["interaction"]) if obj.get("interaction") is not None else None, + "nonce": BasicMessageResponseNonce.from_dict(obj["nonce"]) if obj.get("nonce") is not None else None, + "webhook_id": obj.get("webhook_id"), + "message_reference": MessageReferenceResponse.from_dict(obj["message_reference"]) if obj.get("message_reference") is not None else None, + "thread": ThreadResponse.from_dict(obj["thread"]) if obj.get("thread") is not None else None, + "mention_channels": [MessageMentionChannelResponse.from_dict(_item) for _item in obj["mention_channels"]] if obj.get("mention_channels") is not None else None, + "role_subscription_data": MessageRoleSubscriptionDataResponse.from_dict(obj["role_subscription_data"]) if obj.get("role_subscription_data") is not None else None, + "purchase_notification": PurchaseNotificationResponse.from_dict(obj["purchase_notification"]) if obj.get("purchase_notification") is not None else None, + "position": obj.get("position"), + "poll": PollResponse.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "interaction_metadata": BasicMessageResponseInteractionMetadata.from_dict(obj["interaction_metadata"]) if obj.get("interaction_metadata") is not None else None, + "message_snapshots": [MessageSnapshotResponse.from_dict(_item) for _item in obj["message_snapshots"]] if obj.get("message_snapshots") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/basic_message_response_components_inner.py b/dc_rest/models/basic_message_response_components_inner.py new file mode 100644 index 0000000..aeeba0d --- /dev/null +++ b/dc_rest/models/basic_message_response_components_inner.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.action_row_component_response import ActionRowComponentResponse +from dc_rest.models.container_component_response import ContainerComponentResponse +from dc_rest.models.file_component_response import FileComponentResponse +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse +from dc_rest.models.section_component_response import SectionComponentResponse +from dc_rest.models.separator_component_response import SeparatorComponentResponse +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BASICMESSAGERESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentResponse", "ContainerComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse"] + +class BasicMessageResponseComponentsInner(BaseModel): + """ + BasicMessageResponseComponentsInner + """ + # data type: ActionRowComponentResponse + oneof_schema_1_validator: Optional[ActionRowComponentResponse] = None + # data type: ContainerComponentResponse + oneof_schema_2_validator: Optional[ContainerComponentResponse] = None + # data type: FileComponentResponse + oneof_schema_3_validator: Optional[FileComponentResponse] = None + # data type: MediaGalleryComponentResponse + oneof_schema_4_validator: Optional[MediaGalleryComponentResponse] = None + # data type: SectionComponentResponse + oneof_schema_5_validator: Optional[SectionComponentResponse] = None + # data type: SeparatorComponentResponse + oneof_schema_6_validator: Optional[SeparatorComponentResponse] = None + # data type: TextDisplayComponentResponse + oneof_schema_7_validator: Optional[TextDisplayComponentResponse] = None + actual_instance: Optional[Union[ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]] = None + one_of_schemas: Set[str] = { "ActionRowComponentResponse", "ContainerComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BasicMessageResponseComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ActionRowComponentResponse + if not isinstance(v, ActionRowComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentResponse`") + else: + match += 1 + # validate data type: ContainerComponentResponse + if not isinstance(v, ContainerComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ContainerComponentResponse`") + else: + match += 1 + # validate data type: FileComponentResponse + if not isinstance(v, FileComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentResponse`") + else: + match += 1 + # validate data type: MediaGalleryComponentResponse + if not isinstance(v, MediaGalleryComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentResponse`") + else: + match += 1 + # validate data type: SectionComponentResponse + if not isinstance(v, SectionComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentResponse`") + else: + match += 1 + # validate data type: SeparatorComponentResponse + if not isinstance(v, SeparatorComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentResponse`") + else: + match += 1 + # validate data type: TextDisplayComponentResponse + if not isinstance(v, TextDisplayComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ActionRowComponentResponse + try: + instance.actual_instance = ActionRowComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ContainerComponentResponse + try: + instance.actual_instance = ContainerComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FileComponentResponse + try: + instance.actual_instance = FileComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MediaGalleryComponentResponse + try: + instance.actual_instance = MediaGalleryComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SectionComponentResponse + try: + instance.actual_instance = SectionComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SeparatorComponentResponse + try: + instance.actual_instance = SeparatorComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextDisplayComponentResponse + try: + instance.actual_instance = TextDisplayComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentResponse, ContainerComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/basic_message_response_interaction_metadata.py b/dc_rest/models/basic_message_response_interaction_metadata.py new file mode 100644 index 0000000..d183d06 --- /dev/null +++ b/dc_rest/models/basic_message_response_interaction_metadata.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse +from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BASICMESSAGERESPONSEINTERACTIONMETADATA_ONE_OF_SCHEMAS = ["ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse", "ModalSubmitInteractionMetadataResponse"] + +class BasicMessageResponseInteractionMetadata(BaseModel): + """ + BasicMessageResponseInteractionMetadata + """ + # data type: ApplicationCommandInteractionMetadataResponse + oneof_schema_1_validator: Optional[ApplicationCommandInteractionMetadataResponse] = None + # data type: MessageComponentInteractionMetadataResponse + oneof_schema_2_validator: Optional[MessageComponentInteractionMetadataResponse] = None + # data type: ModalSubmitInteractionMetadataResponse + oneof_schema_3_validator: Optional[ModalSubmitInteractionMetadataResponse] = None + actual_instance: Optional[Union[ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse]] = None + one_of_schemas: Set[str] = { "ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse", "ModalSubmitInteractionMetadataResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = BasicMessageResponseInteractionMetadata.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandInteractionMetadataResponse + if not isinstance(v, ApplicationCommandInteractionMetadataResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandInteractionMetadataResponse`") + else: + match += 1 + # validate data type: MessageComponentInteractionMetadataResponse + if not isinstance(v, MessageComponentInteractionMetadataResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MessageComponentInteractionMetadataResponse`") + else: + match += 1 + # validate data type: ModalSubmitInteractionMetadataResponse + if not isinstance(v, ModalSubmitInteractionMetadataResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ModalSubmitInteractionMetadataResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandInteractionMetadataResponse + try: + instance.actual_instance = ApplicationCommandInteractionMetadataResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MessageComponentInteractionMetadataResponse + try: + instance.actual_instance = MessageComponentInteractionMetadataResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ModalSubmitInteractionMetadataResponse + try: + instance.actual_instance = ModalSubmitInteractionMetadataResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse, ModalSubmitInteractionMetadataResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/basic_message_response_nonce.py b/dc_rest/models/basic_message_response_nonce.py new file mode 100644 index 0000000..6fc2952 --- /dev/null +++ b/dc_rest/models/basic_message_response_nonce.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BASICMESSAGERESPONSENONCE_ONE_OF_SCHEMAS = ["int", "str"] + +class BasicMessageResponseNonce(BaseModel): + """ + BasicMessageResponseNonce + """ + # data type: int + oneof_schema_1_validator: Optional[Annotated[int, Field(le=9223372036854775807, strict=True, ge=-9223372036854775808)]] = None + # data type: str + oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True, max_length=25)]] = None + actual_instance: Optional[Union[int, str]] = None + one_of_schemas: Set[str] = { "int", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = BasicMessageResponseNonce.model_construct() + error_messages = [] + match = 0 + # validate data type: int + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into int + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BasicMessageResponseNonce with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/block_message_action.py b/dc_rest/models/block_message_action.py new file mode 100644 index 0000000..631cc97 --- /dev/null +++ b/dc_rest/models/block_message_action.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata +from typing import Optional, Set +from typing_extensions import Self + +class BlockMessageAction(BaseModel): + """ + BlockMessageAction + """ # noqa: E501 + type: StrictInt + metadata: Optional[BlockMessageActionMetadata] = None + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockMessageAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockMessageAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BlockMessageAction) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": BlockMessageActionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/block_message_action_metadata.py b/dc_rest/models/block_message_action_metadata.py new file mode 100644 index 0000000..3bb72df --- /dev/null +++ b/dc_rest/models/block_message_action_metadata.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BlockMessageActionMetadata(BaseModel): + """ + BlockMessageActionMetadata + """ # noqa: E501 + custom_message: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + __properties: ClassVar[List[str]] = ["custom_message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockMessageActionMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if custom_message (nullable) is None + # and model_fields_set contains the field + if self.custom_message is None and "custom_message" in self.model_fields_set: + _dict['custom_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockMessageActionMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BlockMessageActionMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "custom_message": obj.get("custom_message") + }) + return _obj + + diff --git a/dc_rest/models/block_message_action_metadata_response.py b/dc_rest/models/block_message_action_metadata_response.py new file mode 100644 index 0000000..27e69ce --- /dev/null +++ b/dc_rest/models/block_message_action_metadata_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BlockMessageActionMetadataResponse(BaseModel): + """ + BlockMessageActionMetadataResponse + """ # noqa: E501 + custom_message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["custom_message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockMessageActionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if custom_message (nullable) is None + # and model_fields_set contains the field + if self.custom_message is None and "custom_message" in self.model_fields_set: + _dict['custom_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockMessageActionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BlockMessageActionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "custom_message": obj.get("custom_message") + }) + return _obj + + diff --git a/dc_rest/models/block_message_action_response.py b/dc_rest/models/block_message_action_response.py new file mode 100644 index 0000000..401b853 --- /dev/null +++ b/dc_rest/models/block_message_action_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class BlockMessageActionResponse(BaseModel): + """ + BlockMessageActionResponse + """ # noqa: E501 + type: StrictInt + metadata: BlockMessageActionMetadataResponse + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockMessageActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockMessageActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BlockMessageActionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": BlockMessageActionMetadataResponse.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/bot_account_patch_request.py b/dc_rest/models/bot_account_patch_request.py new file mode 100644 index 0000000..06e90ef --- /dev/null +++ b/dc_rest/models/bot_account_patch_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BotAccountPatchRequest(BaseModel): + """ + BotAccountPatchRequest + """ # noqa: E501 + username: Annotated[str, Field(min_length=2, strict=True, max_length=32)] + avatar: Optional[StrictStr] = None + banner: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "avatar", "banner"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BotAccountPatchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BotAccountPatchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BotAccountPatchRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "avatar": obj.get("avatar"), + "banner": obj.get("banner") + }) + return _obj + + diff --git a/dc_rest/models/bulk_ban_users_from_guild_request.py b/dc_rest/models/bulk_ban_users_from_guild_request.py new file mode 100644 index 0000000..0660f08 --- /dev/null +++ b/dc_rest/models/bulk_ban_users_from_guild_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkBanUsersFromGuildRequest(BaseModel): + """ + BulkBanUsersFromGuildRequest + """ # noqa: E501 + user_ids: Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=200)] + delete_message_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["user_ids", "delete_message_seconds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkBanUsersFromGuildRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if delete_message_seconds (nullable) is None + # and model_fields_set contains the field + if self.delete_message_seconds is None and "delete_message_seconds" in self.model_fields_set: + _dict['delete_message_seconds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkBanUsersFromGuildRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkBanUsersFromGuildRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "user_ids": obj.get("user_ids"), + "delete_message_seconds": obj.get("delete_message_seconds") + }) + return _obj + + diff --git a/dc_rest/models/bulk_ban_users_response.py b/dc_rest/models/bulk_ban_users_response.py new file mode 100644 index 0000000..edd7f0f --- /dev/null +++ b/dc_rest/models/bulk_ban_users_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkBanUsersResponse(BaseModel): + """ + BulkBanUsersResponse + """ # noqa: E501 + banned_users: List[Annotated[str, Field(strict=True)]] + failed_users: List[Annotated[str, Field(strict=True)]] + __properties: ClassVar[List[str]] = ["banned_users", "failed_users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkBanUsersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkBanUsersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkBanUsersResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "banned_users": obj.get("banned_users"), + "failed_users": obj.get("failed_users") + }) + return _obj + + diff --git a/dc_rest/models/bulk_delete_messages_request.py b/dc_rest/models/bulk_delete_messages_request.py new file mode 100644 index 0000000..568b6b7 --- /dev/null +++ b/dc_rest/models/bulk_delete_messages_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkDeleteMessagesRequest(BaseModel): + """ + BulkDeleteMessagesRequest + """ # noqa: E501 + messages: Annotated[List[Annotated[str, Field(strict=True)]], Field(min_length=2, max_length=100)] + __properties: ClassVar[List[str]] = ["messages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkDeleteMessagesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkDeleteMessagesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkDeleteMessagesRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "messages": obj.get("messages") + }) + return _obj + + diff --git a/dc_rest/models/bulk_lobby_member_request.py b/dc_rest/models/bulk_lobby_member_request.py new file mode 100644 index 0000000..a59e1d1 --- /dev/null +++ b/dc_rest/models/bulk_lobby_member_request.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkLobbyMemberRequest(BaseModel): + """ + BulkLobbyMemberRequest + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + flags: Optional[StrictInt] = None + remove_member: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "metadata", "flags", "remove_member"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('flags') + def flags_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([1]): + raise ValueError("must be one of enum values (1)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkLobbyMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if remove_member (nullable) is None + # and model_fields_set contains the field + if self.remove_member is None and "remove_member" in self.model_fields_set: + _dict['remove_member'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkLobbyMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkLobbyMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "flags": obj.get("flags"), + "remove_member": obj.get("remove_member") + }) + return _obj + + diff --git a/dc_rest/models/bulk_update_guild_channels_request_inner.py b/dc_rest/models/bulk_update_guild_channels_request_inner.py new file mode 100644 index 0000000..4b45e16 --- /dev/null +++ b/dc_rest/models/bulk_update_guild_channels_request_inner.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkUpdateGuildChannelsRequestInner(BaseModel): + """ + BulkUpdateGuildChannelsRequestInner + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + lock_permissions: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "position", "parent_id", "lock_permissions"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkUpdateGuildChannelsRequestInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if lock_permissions (nullable) is None + # and model_fields_set contains the field + if self.lock_permissions is None and "lock_permissions" in self.model_fields_set: + _dict['lock_permissions'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkUpdateGuildChannelsRequestInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkUpdateGuildChannelsRequestInner) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "position": obj.get("position"), + "parent_id": obj.get("parent_id"), + "lock_permissions": obj.get("lock_permissions") + }) + return _obj + + diff --git a/dc_rest/models/bulk_update_guild_roles_request_inner.py b/dc_rest/models/bulk_update_guild_roles_request_inner.py new file mode 100644 index 0000000..2820933 --- /dev/null +++ b/dc_rest/models/bulk_update_guild_roles_request_inner.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkUpdateGuildRolesRequestInner(BaseModel): + """ + BulkUpdateGuildRolesRequestInner + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + position: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "position"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkUpdateGuildRolesRequestInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkUpdateGuildRolesRequestInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in BulkUpdateGuildRolesRequestInner) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "position": obj.get("position") + }) + return _obj + + diff --git a/dc_rest/models/button_component_for_message_request.py b/dc_rest/models/button_component_for_message_request.py new file mode 100644 index 0000000..edaeedb --- /dev/null +++ b/dc_rest/models/button_component_for_message_request.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest +from typing import Optional, Set +from typing_extensions import Self + +class ButtonComponentForMessageRequest(BaseModel): + """ + ButtonComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + style: Optional[StrictInt] + label: Optional[Annotated[str, Field(strict=True, max_length=80)]] = None + disabled: Optional[StrictBool] = None + url: Optional[Annotated[str, Field(strict=True, max_length=512)]] = None + sku_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji: Optional[ComponentEmojiForMessageRequest] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "style", "label", "disabled", "url", "sku_id", "emoji"] + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ButtonComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if custom_id (nullable) is None + # and model_fields_set contains the field + if self.custom_id is None and "custom_id" in self.model_fields_set: + _dict['custom_id'] = None + + # set to None if style (nullable) is None + # and model_fields_set contains the field + if self.style is None and "style" in self.model_fields_set: + _dict['style'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ButtonComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ButtonComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "style": obj.get("style"), + "label": obj.get("label"), + "disabled": obj.get("disabled"), + "url": obj.get("url"), + "sku_id": obj.get("sku_id"), + "emoji": ComponentEmojiForMessageRequest.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/button_component_response.py b/dc_rest/models/button_component_response.py new file mode 100644 index 0000000..d18e350 --- /dev/null +++ b/dc_rest/models/button_component_response.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.component_emoji_response import ComponentEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class ButtonComponentResponse(BaseModel): + """ + ButtonComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: Optional[StrictStr] = None + style: Optional[StrictInt] + label: Optional[StrictStr] = None + disabled: Optional[StrictBool] = None + emoji: Optional[ComponentEmojiResponse] = None + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + sku_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "style", "label", "disabled", "emoji", "url", "sku_id"] + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ButtonComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if custom_id (nullable) is None + # and model_fields_set contains the field + if self.custom_id is None and "custom_id" in self.model_fields_set: + _dict['custom_id'] = None + + # set to None if style (nullable) is None + # and model_fields_set contains the field + if self.style is None and "style" in self.model_fields_set: + _dict['style'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ButtonComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ButtonComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "style": obj.get("style"), + "label": obj.get("label"), + "disabled": obj.get("disabled"), + "emoji": ComponentEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "url": obj.get("url"), + "sku_id": obj.get("sku_id") + }) + return _obj + + diff --git a/dc_rest/models/channel_follower_response.py b/dc_rest/models/channel_follower_response.py new file mode 100644 index 0000000..d2b281f --- /dev/null +++ b/dc_rest/models/channel_follower_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelFollowerResponse(BaseModel): + """ + ChannelFollowerResponse + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + webhook_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["channel_id", "webhook_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('webhook_id') + def webhook_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelFollowerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelFollowerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelFollowerResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "webhook_id": obj.get("webhook_id") + }) + return _obj + + diff --git a/dc_rest/models/channel_follower_webhook_response.py b/dc_rest/models/channel_follower_webhook_response.py new file mode 100644 index 0000000..2aa7576 --- /dev/null +++ b/dc_rest/models/channel_follower_webhook_response.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse +from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse +from typing import Optional, Set +from typing_extensions import Self + +class ChannelFollowerWebhookResponse(BaseModel): + """ + ChannelFollowerWebhookResponse + """ # noqa: E501 + application_id: Optional[Annotated[str, Field(strict=True)]] = None + avatar: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + id: Annotated[str, Field(strict=True)] + name: StrictStr + type: StrictInt + user: Optional[UserResponse] = None + source_guild: Optional[WebhookSourceGuildResponse] = None + source_channel: Optional[WebhookSourceChannelResponse] = None + __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user", "source_guild", "source_channel"] + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelFollowerWebhookResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of source_guild + if self.source_guild: + _dict['source_guild'] = self.source_guild.to_dict() + # override the default output from pydantic by calling `to_dict()` of source_channel + if self.source_channel: + _dict['source_channel'] = self.source_channel.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if source_guild (nullable) is None + # and model_fields_set contains the field + if self.source_guild is None and "source_guild" in self.model_fields_set: + _dict['source_guild'] = None + + # set to None if source_channel (nullable) is None + # and model_fields_set contains the field + if self.source_channel is None and "source_channel" in self.model_fields_set: + _dict['source_channel'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelFollowerWebhookResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelFollowerWebhookResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "application_id": obj.get("application_id"), + "avatar": obj.get("avatar"), + "channel_id": obj.get("channel_id"), + "guild_id": obj.get("guild_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "source_guild": WebhookSourceGuildResponse.from_dict(obj["source_guild"]) if obj.get("source_guild") is not None else None, + "source_channel": WebhookSourceChannelResponse.from_dict(obj["source_channel"]) if obj.get("source_channel") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/channel_permission_overwrite_request.py b/dc_rest/models/channel_permission_overwrite_request.py new file mode 100644 index 0000000..1e6dc2f --- /dev/null +++ b/dc_rest/models/channel_permission_overwrite_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelPermissionOverwriteRequest(BaseModel): + """ + ChannelPermissionOverwriteRequest + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: Optional[StrictInt] = None + allow: Optional[StrictInt] = None + deny: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "type", "allow", "deny"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelPermissionOverwriteRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if allow (nullable) is None + # and model_fields_set contains the field + if self.allow is None and "allow" in self.model_fields_set: + _dict['allow'] = None + + # set to None if deny (nullable) is None + # and model_fields_set contains the field + if self.deny is None and "deny" in self.model_fields_set: + _dict['deny'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelPermissionOverwriteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelPermissionOverwriteRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "allow": obj.get("allow"), + "deny": obj.get("deny") + }) + return _obj + + diff --git a/dc_rest/models/channel_permission_overwrite_response.py b/dc_rest/models/channel_permission_overwrite_response.py new file mode 100644 index 0000000..876bec0 --- /dev/null +++ b/dc_rest/models/channel_permission_overwrite_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelPermissionOverwriteResponse(BaseModel): + """ + ChannelPermissionOverwriteResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: Optional[StrictInt] + allow: StrictStr + deny: StrictStr + __properties: ClassVar[List[str]] = ["id", "type", "allow", "deny"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelPermissionOverwriteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelPermissionOverwriteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelPermissionOverwriteResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "allow": obj.get("allow"), + "deny": obj.get("deny") + }) + return _obj + + diff --git a/dc_rest/models/channel_select_component_for_message_request.py b/dc_rest/models/channel_select_component_for_message_request.py new file mode 100644 index 0000000..84aae56 --- /dev/null +++ b/dc_rest/models/channel_select_component_for_message_request.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue +from typing import Optional, Set +from typing_extensions import Self + +class ChannelSelectComponentForMessageRequest(BaseModel): + """ + ChannelSelectComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None + max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None + disabled: Optional[StrictBool] = None + default_values: Optional[Annotated[List[ChannelSelectDefaultValue], Field(max_length=25)]] = None + channel_types: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values", "channel_types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelSelectComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + # set to None if channel_types (nullable) is None + # and model_fields_set contains the field + if self.channel_types is None and "channel_types" in self.model_fields_set: + _dict['channel_types'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelSelectComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelSelectComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [ChannelSelectDefaultValue.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None, + "channel_types": obj.get("channel_types") + }) + return _obj + + diff --git a/dc_rest/models/channel_select_component_response.py b/dc_rest/models/channel_select_component_response.py new file mode 100644 index 0000000..7d072db --- /dev/null +++ b/dc_rest/models/channel_select_component_response.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse +from typing import Optional, Set +from typing_extensions import Self + +class ChannelSelectComponentResponse(BaseModel): + """ + ChannelSelectComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + placeholder: Optional[StrictStr] = None + min_values: Optional[StrictInt] = None + max_values: Optional[StrictInt] = None + disabled: Optional[StrictBool] = None + channel_types: Optional[List[StrictInt]] = None + default_values: Optional[List[ChannelSelectDefaultValueResponse]] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "channel_types", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelSelectComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if channel_types (nullable) is None + # and model_fields_set contains the field + if self.channel_types is None and "channel_types" in self.model_fields_set: + _dict['channel_types'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelSelectComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelSelectComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "channel_types": obj.get("channel_types"), + "default_values": [ChannelSelectDefaultValueResponse.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/channel_select_default_value.py b/dc_rest/models/channel_select_default_value.py new file mode 100644 index 0000000..a8f43fb --- /dev/null +++ b/dc_rest/models/channel_select_default_value.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelSelectDefaultValue(BaseModel): + """ + ChannelSelectDefaultValue + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelSelectDefaultValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelSelectDefaultValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelSelectDefaultValue) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/channel_select_default_value_response.py b/dc_rest/models/channel_select_default_value_response.py new file mode 100644 index 0000000..20c3c80 --- /dev/null +++ b/dc_rest/models/channel_select_default_value_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelSelectDefaultValueResponse(BaseModel): + """ + ChannelSelectDefaultValueResponse + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelSelectDefaultValueResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelSelectDefaultValueResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ChannelSelectDefaultValueResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/command_permission_response.py b/dc_rest/models/command_permission_response.py new file mode 100644 index 0000000..af206c2 --- /dev/null +++ b/dc_rest/models/command_permission_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CommandPermissionResponse(BaseModel): + """ + CommandPermissionResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + permission: StrictBool + __properties: ClassVar[List[str]] = ["id", "type", "permission"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CommandPermissionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CommandPermissionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CommandPermissionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "permission": obj.get("permission") + }) + return _obj + + diff --git a/dc_rest/models/command_permissions_response.py b/dc_rest/models/command_permissions_response.py new file mode 100644 index 0000000..72f27cb --- /dev/null +++ b/dc_rest/models/command_permissions_response.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.command_permission_response import CommandPermissionResponse +from typing import Optional, Set +from typing_extensions import Self + +class CommandPermissionsResponse(BaseModel): + """ + CommandPermissionsResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + application_id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + permissions: List[CommandPermissionResponse] + __properties: ClassVar[List[str]] = ["id", "application_id", "guild_id", "permissions"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CommandPermissionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CommandPermissionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CommandPermissionsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "application_id": obj.get("application_id"), + "guild_id": obj.get("guild_id"), + "permissions": [CommandPermissionResponse.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/component_emoji_for_message_request.py b/dc_rest/models/component_emoji_for_message_request.py new file mode 100644 index 0000000..ba88565 --- /dev/null +++ b/dc_rest/models/component_emoji_for_message_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ComponentEmojiForMessageRequest(BaseModel): + """ + ComponentEmojiForMessageRequest + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: Annotated[str, Field(strict=True, max_length=32)] + __properties: ClassVar[List[str]] = ["id", "name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ComponentEmojiForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComponentEmojiForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ComponentEmojiForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/component_emoji_response.py b/dc_rest/models/component_emoji_response.py new file mode 100644 index 0000000..8433327 --- /dev/null +++ b/dc_rest/models/component_emoji_response.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ComponentEmojiResponse(BaseModel): + """ + ComponentEmojiResponse + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: StrictStr + animated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "animated"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ComponentEmojiResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if animated (nullable) is None + # and model_fields_set contains the field + if self.animated is None and "animated" in self.model_fields_set: + _dict['animated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComponentEmojiResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ComponentEmojiResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "animated": obj.get("animated") + }) + return _obj + + diff --git a/dc_rest/models/connected_account_guild_response.py b/dc_rest/models/connected_account_guild_response.py new file mode 100644 index 0000000..705aadb --- /dev/null +++ b/dc_rest/models/connected_account_guild_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ConnectedAccountGuildResponse(BaseModel): + """ + ConnectedAccountGuildResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + icon: Optional[StrictStr] = None + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "icon", "name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectedAccountGuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectedAccountGuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ConnectedAccountGuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "icon": obj.get("icon"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/connected_account_integration_response.py b/dc_rest/models/connected_account_integration_response.py new file mode 100644 index 0000000..03b1884 --- /dev/null +++ b/dc_rest/models/connected_account_integration_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.account_response import AccountResponse +from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse +from typing import Optional, Set +from typing_extensions import Self + +class ConnectedAccountIntegrationResponse(BaseModel): + """ + ConnectedAccountIntegrationResponse + """ # noqa: E501 + id: StrictStr + type: Optional[StrictStr] + account: AccountResponse + guild: ConnectedAccountGuildResponse + __properties: ClassVar[List[str]] = ["id", "type", "account", "guild"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectedAccountIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # override the default output from pydantic by calling `to_dict()` of guild + if self.guild: + _dict['guild'] = self.guild.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectedAccountIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ConnectedAccountIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, + "guild": ConnectedAccountGuildResponse.from_dict(obj["guild"]) if obj.get("guild") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/connected_account_response.py b/dc_rest/models/connected_account_response.py new file mode 100644 index 0000000..751c281 --- /dev/null +++ b/dc_rest/models/connected_account_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse +from typing import Optional, Set +from typing_extensions import Self + +class ConnectedAccountResponse(BaseModel): + """ + ConnectedAccountResponse + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = None + type: Optional[StrictStr] + friend_sync: StrictBool + integrations: Optional[List[ConnectedAccountIntegrationResponse]] = None + show_activity: StrictBool + two_way_link: StrictBool + verified: StrictBool + visibility: Optional[StrictInt] + revoked: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "friend_sync", "integrations", "show_activity", "two_way_link", "verified", "visibility", "revoked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectedAccountResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in integrations (list) + _items = [] + if self.integrations: + for _item_integrations in self.integrations: + if _item_integrations: + _items.append(_item_integrations.to_dict()) + _dict['integrations'] = _items + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if integrations (nullable) is None + # and model_fields_set contains the field + if self.integrations is None and "integrations" in self.model_fields_set: + _dict['integrations'] = None + + # set to None if visibility (nullable) is None + # and model_fields_set contains the field + if self.visibility is None and "visibility" in self.model_fields_set: + _dict['visibility'] = None + + # set to None if revoked (nullable) is None + # and model_fields_set contains the field + if self.revoked is None and "revoked" in self.model_fields_set: + _dict['revoked'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectedAccountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ConnectedAccountResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "friend_sync": obj.get("friend_sync"), + "integrations": [ConnectedAccountIntegrationResponse.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None, + "show_activity": obj.get("show_activity"), + "two_way_link": obj.get("two_way_link"), + "verified": obj.get("verified"), + "visibility": obj.get("visibility"), + "revoked": obj.get("revoked") + }) + return _obj + + diff --git a/dc_rest/models/container_component_for_message_request.py b/dc_rest/models/container_component_for_message_request.py new file mode 100644 index 0000000..a55f2ad --- /dev/null +++ b/dc_rest/models/container_component_for_message_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner +from typing import Optional, Set +from typing_extensions import Self + +class ContainerComponentForMessageRequest(BaseModel): + """ + ContainerComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + accent_color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None + components: Annotated[List[ContainerComponentForMessageRequestComponentsInner], Field(min_length=1, max_length=40)] + spoiler: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "accent_color", "components", "spoiler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ContainerComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # set to None if accent_color (nullable) is None + # and model_fields_set contains the field + if self.accent_color is None and "accent_color" in self.model_fields_set: + _dict['accent_color'] = None + + # set to None if spoiler (nullable) is None + # and model_fields_set contains the field + if self.spoiler is None and "spoiler" in self.model_fields_set: + _dict['spoiler'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ContainerComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ContainerComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "accent_color": obj.get("accent_color"), + "components": [ContainerComponentForMessageRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "spoiler": obj.get("spoiler") + }) + return _obj + + diff --git a/dc_rest/models/container_component_for_message_request_components_inner.py b/dc_rest/models/container_component_for_message_request_components_inner.py new file mode 100644 index 0000000..1a87ab5 --- /dev/null +++ b/dc_rest/models/container_component_for_message_request_components_inner.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CONTAINERCOMPONENTFORMESSAGEREQUESTCOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest"] + +class ContainerComponentForMessageRequestComponentsInner(BaseModel): + """ + ContainerComponentForMessageRequestComponentsInner + """ + # data type: ActionRowComponentForMessageRequest + oneof_schema_1_validator: Optional[ActionRowComponentForMessageRequest] = None + # data type: FileComponentForMessageRequest + oneof_schema_2_validator: Optional[FileComponentForMessageRequest] = None + # data type: MediaGalleryComponentForMessageRequest + oneof_schema_3_validator: Optional[MediaGalleryComponentForMessageRequest] = None + # data type: SectionComponentForMessageRequest + oneof_schema_4_validator: Optional[SectionComponentForMessageRequest] = None + # data type: SeparatorComponentForMessageRequest + oneof_schema_5_validator: Optional[SeparatorComponentForMessageRequest] = None + # data type: TextDisplayComponentForMessageRequest + oneof_schema_6_validator: Optional[TextDisplayComponentForMessageRequest] = None + actual_instance: Optional[Union[ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]] = None + one_of_schemas: Set[str] = { "ActionRowComponentForMessageRequest", "FileComponentForMessageRequest", "MediaGalleryComponentForMessageRequest", "SectionComponentForMessageRequest", "SeparatorComponentForMessageRequest", "TextDisplayComponentForMessageRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ContainerComponentForMessageRequestComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ActionRowComponentForMessageRequest + if not isinstance(v, ActionRowComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentForMessageRequest`") + else: + match += 1 + # validate data type: FileComponentForMessageRequest + if not isinstance(v, FileComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentForMessageRequest`") + else: + match += 1 + # validate data type: MediaGalleryComponentForMessageRequest + if not isinstance(v, MediaGalleryComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentForMessageRequest`") + else: + match += 1 + # validate data type: SectionComponentForMessageRequest + if not isinstance(v, SectionComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentForMessageRequest`") + else: + match += 1 + # validate data type: SeparatorComponentForMessageRequest + if not isinstance(v, SeparatorComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentForMessageRequest`") + else: + match += 1 + # validate data type: TextDisplayComponentForMessageRequest + if not isinstance(v, TextDisplayComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentForMessageRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ActionRowComponentForMessageRequest + try: + instance.actual_instance = ActionRowComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FileComponentForMessageRequest + try: + instance.actual_instance = FileComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MediaGalleryComponentForMessageRequest + try: + instance.actual_instance = MediaGalleryComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SectionComponentForMessageRequest + try: + instance.actual_instance = SectionComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SeparatorComponentForMessageRequest + try: + instance.actual_instance = SeparatorComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextDisplayComponentForMessageRequest + try: + instance.actual_instance = TextDisplayComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ContainerComponentForMessageRequestComponentsInner with oneOf schemas: ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentForMessageRequest, FileComponentForMessageRequest, MediaGalleryComponentForMessageRequest, SectionComponentForMessageRequest, SeparatorComponentForMessageRequest, TextDisplayComponentForMessageRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/container_component_response.py b/dc_rest/models/container_component_response.py new file mode 100644 index 0000000..6f61dc0 --- /dev/null +++ b/dc_rest/models/container_component_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner +from typing import Optional, Set +from typing_extensions import Self + +class ContainerComponentResponse(BaseModel): + """ + ContainerComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + accent_color: Optional[StrictInt] = None + components: List[ContainerComponentResponseComponentsInner] + spoiler: StrictBool + __properties: ClassVar[List[str]] = ["type", "id", "accent_color", "components", "spoiler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ContainerComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # set to None if accent_color (nullable) is None + # and model_fields_set contains the field + if self.accent_color is None and "accent_color" in self.model_fields_set: + _dict['accent_color'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ContainerComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ContainerComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "accent_color": obj.get("accent_color"), + "components": [ContainerComponentResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "spoiler": obj.get("spoiler") + }) + return _obj + + diff --git a/dc_rest/models/container_component_response_components_inner.py b/dc_rest/models/container_component_response_components_inner.py new file mode 100644 index 0000000..5a36b45 --- /dev/null +++ b/dc_rest/models/container_component_response_components_inner.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.action_row_component_response import ActionRowComponentResponse +from dc_rest.models.file_component_response import FileComponentResponse +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse +from dc_rest.models.section_component_response import SectionComponentResponse +from dc_rest.models.separator_component_response import SeparatorComponentResponse +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CONTAINERCOMPONENTRESPONSECOMPONENTSINNER_ONE_OF_SCHEMAS = ["ActionRowComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse"] + +class ContainerComponentResponseComponentsInner(BaseModel): + """ + ContainerComponentResponseComponentsInner + """ + # data type: ActionRowComponentResponse + oneof_schema_1_validator: Optional[ActionRowComponentResponse] = None + # data type: FileComponentResponse + oneof_schema_2_validator: Optional[FileComponentResponse] = None + # data type: MediaGalleryComponentResponse + oneof_schema_3_validator: Optional[MediaGalleryComponentResponse] = None + # data type: SectionComponentResponse + oneof_schema_4_validator: Optional[SectionComponentResponse] = None + # data type: SeparatorComponentResponse + oneof_schema_5_validator: Optional[SeparatorComponentResponse] = None + # data type: TextDisplayComponentResponse + oneof_schema_6_validator: Optional[TextDisplayComponentResponse] = None + actual_instance: Optional[Union[ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]] = None + one_of_schemas: Set[str] = { "ActionRowComponentResponse", "FileComponentResponse", "MediaGalleryComponentResponse", "SectionComponentResponse", "SeparatorComponentResponse", "TextDisplayComponentResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ContainerComponentResponseComponentsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ActionRowComponentResponse + if not isinstance(v, ActionRowComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ActionRowComponentResponse`") + else: + match += 1 + # validate data type: FileComponentResponse + if not isinstance(v, FileComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `FileComponentResponse`") + else: + match += 1 + # validate data type: MediaGalleryComponentResponse + if not isinstance(v, MediaGalleryComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaGalleryComponentResponse`") + else: + match += 1 + # validate data type: SectionComponentResponse + if not isinstance(v, SectionComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SectionComponentResponse`") + else: + match += 1 + # validate data type: SeparatorComponentResponse + if not isinstance(v, SeparatorComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SeparatorComponentResponse`") + else: + match += 1 + # validate data type: TextDisplayComponentResponse + if not isinstance(v, TextDisplayComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextDisplayComponentResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ActionRowComponentResponse + try: + instance.actual_instance = ActionRowComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FileComponentResponse + try: + instance.actual_instance = FileComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MediaGalleryComponentResponse + try: + instance.actual_instance = MediaGalleryComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SectionComponentResponse + try: + instance.actual_instance = SectionComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SeparatorComponentResponse + try: + instance.actual_instance = SeparatorComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextDisplayComponentResponse + try: + instance.actual_instance = TextDisplayComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ContainerComponentResponseComponentsInner with oneOf schemas: ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ActionRowComponentResponse, FileComponentResponse, MediaGalleryComponentResponse, SectionComponentResponse, SeparatorComponentResponse, TextDisplayComponentResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_application_emoji_request.py b/dc_rest/models/create_application_emoji_request.py new file mode 100644 index 0000000..443d1fe --- /dev/null +++ b/dc_rest/models/create_application_emoji_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateApplicationEmojiRequest(BaseModel): + """ + CreateApplicationEmojiRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=2, strict=True, max_length=32)] + image: StrictStr + __properties: ClassVar[List[str]] = ["name", "image"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateApplicationEmojiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateApplicationEmojiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateApplicationEmojiRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "image": obj.get("image") + }) + return _obj + + diff --git a/dc_rest/models/create_auto_moderation_rule200_response.py b/dc_rest/models/create_auto_moderation_rule200_response.py new file mode 100644 index 0000000..10b3ef3 --- /dev/null +++ b/dc_rest/models/create_auto_moderation_rule200_response.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse +from dc_rest.models.keyword_rule_response import KeywordRuleResponse +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEAUTOMODERATIONRULE200RESPONSE_ONE_OF_SCHEMAS = ["DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse"] + +class CreateAutoModerationRule200Response(BaseModel): + """ + CreateAutoModerationRule200Response + """ + # data type: DefaultKeywordRuleResponse + oneof_schema_1_validator: Optional[DefaultKeywordRuleResponse] = None + # data type: KeywordRuleResponse + oneof_schema_2_validator: Optional[KeywordRuleResponse] = None + # data type: MLSpamRuleResponse + oneof_schema_3_validator: Optional[MLSpamRuleResponse] = None + # data type: MentionSpamRuleResponse + oneof_schema_4_validator: Optional[MentionSpamRuleResponse] = None + # data type: SpamLinkRuleResponse + oneof_schema_5_validator: Optional[SpamLinkRuleResponse] = None + actual_instance: Optional[Union[DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]] = None + one_of_schemas: Set[str] = { "DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateAutoModerationRule200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultKeywordRuleResponse + if not isinstance(v, DefaultKeywordRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordRuleResponse`") + else: + match += 1 + # validate data type: KeywordRuleResponse + if not isinstance(v, KeywordRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordRuleResponse`") + else: + match += 1 + # validate data type: MLSpamRuleResponse + if not isinstance(v, MLSpamRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamRuleResponse`") + else: + match += 1 + # validate data type: MentionSpamRuleResponse + if not isinstance(v, MentionSpamRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamRuleResponse`") + else: + match += 1 + # validate data type: SpamLinkRuleResponse + if not isinstance(v, SpamLinkRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SpamLinkRuleResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DefaultKeywordRuleResponse + try: + instance.actual_instance = DefaultKeywordRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into KeywordRuleResponse + try: + instance.actual_instance = KeywordRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MLSpamRuleResponse + try: + instance.actual_instance = MLSpamRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MentionSpamRuleResponse + try: + instance.actual_instance = MentionSpamRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SpamLinkRuleResponse + try: + instance.actual_instance = SpamLinkRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateAutoModerationRule200Response with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_auto_moderation_rule_request.py b/dc_rest/models/create_auto_moderation_rule_request.py new file mode 100644 index 0000000..b70fbfe --- /dev/null +++ b/dc_rest/models/create_auto_moderation_rule_request.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest +from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest +from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest +from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEAUTOMODERATIONRULEREQUEST_ONE_OF_SCHEMAS = ["DefaultKeywordListUpsertRequest", "KeywordUpsertRequest", "MLSpamUpsertRequest", "MentionSpamUpsertRequest"] + +class CreateAutoModerationRuleRequest(BaseModel): + """ + CreateAutoModerationRuleRequest + """ + # data type: DefaultKeywordListUpsertRequest + oneof_schema_1_validator: Optional[DefaultKeywordListUpsertRequest] = None + # data type: KeywordUpsertRequest + oneof_schema_2_validator: Optional[KeywordUpsertRequest] = None + # data type: MLSpamUpsertRequest + oneof_schema_3_validator: Optional[MLSpamUpsertRequest] = None + # data type: MentionSpamUpsertRequest + oneof_schema_4_validator: Optional[MentionSpamUpsertRequest] = None + actual_instance: Optional[Union[DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest]] = None + one_of_schemas: Set[str] = { "DefaultKeywordListUpsertRequest", "KeywordUpsertRequest", "MLSpamUpsertRequest", "MentionSpamUpsertRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateAutoModerationRuleRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultKeywordListUpsertRequest + if not isinstance(v, DefaultKeywordListUpsertRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordListUpsertRequest`") + else: + match += 1 + # validate data type: KeywordUpsertRequest + if not isinstance(v, KeywordUpsertRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordUpsertRequest`") + else: + match += 1 + # validate data type: MLSpamUpsertRequest + if not isinstance(v, MLSpamUpsertRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamUpsertRequest`") + else: + match += 1 + # validate data type: MentionSpamUpsertRequest + if not isinstance(v, MentionSpamUpsertRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamUpsertRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DefaultKeywordListUpsertRequest + try: + instance.actual_instance = DefaultKeywordListUpsertRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into KeywordUpsertRequest + try: + instance.actual_instance = KeywordUpsertRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MLSpamUpsertRequest + try: + instance.actual_instance = MLSpamUpsertRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MentionSpamUpsertRequest + try: + instance.actual_instance = MentionSpamUpsertRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateAutoModerationRuleRequest with oneOf schemas: DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordListUpsertRequest, KeywordUpsertRequest, MLSpamUpsertRequest, MentionSpamUpsertRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_channel_invite_request.py b/dc_rest/models/create_channel_invite_request.py new file mode 100644 index 0000000..13d3db5 --- /dev/null +++ b/dc_rest/models/create_channel_invite_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest +from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CREATECHANNELINVITEREQUEST_ANY_OF_SCHEMAS = ["CreateGroupDMInviteRequest", "CreateGuildInviteRequest"] + +class CreateChannelInviteRequest(BaseModel): + """ + CreateChannelInviteRequest + """ + + # data type: CreateGroupDMInviteRequest + anyof_schema_1_validator: Optional[CreateGroupDMInviteRequest] = None + # data type: CreateGuildInviteRequest + anyof_schema_2_validator: Optional[CreateGuildInviteRequest] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[CreateGroupDMInviteRequest, CreateGuildInviteRequest]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "CreateGroupDMInviteRequest", "CreateGuildInviteRequest" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = CreateChannelInviteRequest.model_construct() + error_messages = [] + # validate data type: CreateGroupDMInviteRequest + if not isinstance(v, CreateGroupDMInviteRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateGroupDMInviteRequest`") + else: + return v + + # validate data type: CreateGuildInviteRequest + if not isinstance(v, CreateGuildInviteRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateGuildInviteRequest`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in CreateChannelInviteRequest with anyOf schemas: CreateGroupDMInviteRequest, CreateGuildInviteRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[CreateGroupDMInviteRequest] = None + try: + instance.actual_instance = CreateGroupDMInviteRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[CreateGuildInviteRequest] = None + try: + instance.actual_instance = CreateGuildInviteRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateChannelInviteRequest with anyOf schemas: CreateGroupDMInviteRequest, CreateGuildInviteRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateGroupDMInviteRequest, CreateGuildInviteRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_entitlement_request_data.py b/dc_rest/models/create_entitlement_request_data.py new file mode 100644 index 0000000..58df64a --- /dev/null +++ b/dc_rest/models/create_entitlement_request_data.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateEntitlementRequestData(BaseModel): + """ + CreateEntitlementRequestData + """ # noqa: E501 + sku_id: Annotated[str, Field(strict=True)] + owner_id: Annotated[str, Field(strict=True)] + owner_type: StrictInt + __properties: ClassVar[List[str]] = ["sku_id", "owner_id", "owner_type"] + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateEntitlementRequestData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateEntitlementRequestData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateEntitlementRequestData) in the input: " + _key) + + _obj = cls.model_validate({ + "sku_id": obj.get("sku_id"), + "owner_id": obj.get("owner_id"), + "owner_type": obj.get("owner_type") + }) + return _obj + + diff --git a/dc_rest/models/create_forum_thread_request.py b/dc_rest/models/create_forum_thread_request.py new file mode 100644 index 0000000..b43eb24 --- /dev/null +++ b/dc_rest/models/create_forum_thread_request.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateForumThreadRequest(BaseModel): + """ + CreateForumThreadRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + auto_archive_duration: Optional[StrictInt] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + applied_tags: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=5)]] = None + message: BaseCreateMessageCreateRequest + __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user", "applied_tags", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateForumThreadRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if applied_tags (nullable) is None + # and model_fields_set contains the field + if self.applied_tags is None and "applied_tags" in self.model_fields_set: + _dict['applied_tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateForumThreadRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateForumThreadRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "auto_archive_duration": obj.get("auto_archive_duration"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "applied_tags": obj.get("applied_tags"), + "message": BaseCreateMessageCreateRequest.from_dict(obj["message"]) if obj.get("message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/create_group_dm_invite_request.py b/dc_rest/models/create_group_dm_invite_request.py new file mode 100644 index 0000000..4a8948b --- /dev/null +++ b/dc_rest/models/create_group_dm_invite_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGroupDMInviteRequest(BaseModel): + """ + CreateGroupDMInviteRequest + """ # noqa: E501 + max_age: Optional[Annotated[int, Field(le=604800, strict=True, ge=1)]] = None + __properties: ClassVar[List[str]] = ["max_age"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGroupDMInviteRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if max_age (nullable) is None + # and model_fields_set contains the field + if self.max_age is None and "max_age" in self.model_fields_set: + _dict['max_age'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGroupDMInviteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGroupDMInviteRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "max_age": obj.get("max_age") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_channel_request.py b/dc_rest/models/create_guild_channel_request.py new file mode 100644 index 0000000..82a88aa --- /dev/null +++ b/dc_rest/models/create_guild_channel_request.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildChannelRequest(BaseModel): + """ + CreateGuildChannelRequest + """ # noqa: E501 + type: Optional[StrictInt] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + topic: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=4096)]] = None + bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None + user_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + nsfw: Optional[StrictBool] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + permission_overwrites: Optional[Annotated[List[ChannelPermissionOverwriteRequest], Field(max_length=100)]] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + default_auto_archive_duration: Optional[StrictInt] = None + default_reaction_emoji: Optional[UpdateDefaultReactionEmojiRequest] = None + default_thread_rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + default_sort_order: Optional[StrictInt] = None + default_forum_layout: Optional[StrictInt] = None + default_tag_setting: Optional[StrictStr] = None + available_tags: Optional[Annotated[List[Optional[CreateOrUpdateThreadTagRequest]], Field(max_length=20)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "permission_overwrites", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "available_tags"] + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildChannelRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list) + _items = [] + if self.permission_overwrites: + for _item_permission_overwrites in self.permission_overwrites: + if _item_permission_overwrites: + _items.append(_item_permission_overwrites.to_dict()) + _dict['permission_overwrites'] = _items + # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji + if self.default_reaction_emoji: + _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list) + _items = [] + if self.available_tags: + for _item_available_tags in self.available_tags: + if _item_available_tags: + _items.append(_item_available_tags.to_dict()) + _dict['available_tags'] = _items + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if topic (nullable) is None + # and model_fields_set contains the field + if self.topic is None and "topic" in self.model_fields_set: + _dict['topic'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if permission_overwrites (nullable) is None + # and model_fields_set contains the field + if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set: + _dict['permission_overwrites'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if default_reaction_emoji (nullable) is None + # and model_fields_set contains the field + if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set: + _dict['default_reaction_emoji'] = None + + # set to None if default_thread_rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set: + _dict['default_thread_rate_limit_per_user'] = None + + # set to None if available_tags (nullable) is None + # and model_fields_set contains the field + if self.available_tags is None and "available_tags" in self.model_fields_set: + _dict['available_tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildChannelRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildChannelRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "position": obj.get("position"), + "topic": obj.get("topic"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "nsfw": obj.get("nsfw"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "parent_id": obj.get("parent_id"), + "permission_overwrites": [ChannelPermissionOverwriteRequest.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None, + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "default_auto_archive_duration": obj.get("default_auto_archive_duration"), + "default_reaction_emoji": UpdateDefaultReactionEmojiRequest.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None, + "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"), + "default_sort_order": obj.get("default_sort_order"), + "default_forum_layout": obj.get("default_forum_layout"), + "default_tag_setting": obj.get("default_tag_setting"), + "available_tags": [CreateOrUpdateThreadTagRequest.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/create_guild_emoji_request.py b/dc_rest/models/create_guild_emoji_request.py new file mode 100644 index 0000000..d55e6e5 --- /dev/null +++ b/dc_rest/models/create_guild_emoji_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildEmojiRequest(BaseModel): + """ + CreateGuildEmojiRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=2, strict=True, max_length=32)] + image: StrictStr + roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None + __properties: ClassVar[List[str]] = ["name", "image", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildEmojiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildEmojiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildEmojiRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "image": obj.get("image"), + "roles": obj.get("roles") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_from_template_request.py b/dc_rest/models/create_guild_from_template_request.py new file mode 100644 index 0000000..c9bf8a9 --- /dev/null +++ b/dc_rest/models/create_guild_from_template_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildFromTemplateRequest(BaseModel): + """ + CreateGuildFromTemplateRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=2, strict=True, max_length=100)] + icon: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "icon"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildFromTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildFromTemplateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildFromTemplateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "icon": obj.get("icon") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_invite_request.py b/dc_rest/models/create_guild_invite_request.py new file mode 100644 index 0000000..134a303 --- /dev/null +++ b/dc_rest/models/create_guild_invite_request.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildInviteRequest(BaseModel): + """ + CreateGuildInviteRequest + """ # noqa: E501 + max_age: Optional[Annotated[int, Field(le=604800, strict=True, ge=0)]] = None + temporary: Optional[StrictBool] = None + max_uses: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = None + unique: Optional[StrictBool] = None + target_user_id: Optional[Annotated[str, Field(strict=True)]] = None + target_application_id: Optional[Annotated[str, Field(strict=True)]] = None + target_type: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["max_age", "temporary", "max_uses", "unique", "target_user_id", "target_application_id", "target_type"] + + @field_validator('target_user_id') + def target_user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('target_application_id') + def target_application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildInviteRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if max_age (nullable) is None + # and model_fields_set contains the field + if self.max_age is None and "max_age" in self.model_fields_set: + _dict['max_age'] = None + + # set to None if temporary (nullable) is None + # and model_fields_set contains the field + if self.temporary is None and "temporary" in self.model_fields_set: + _dict['temporary'] = None + + # set to None if max_uses (nullable) is None + # and model_fields_set contains the field + if self.max_uses is None and "max_uses" in self.model_fields_set: + _dict['max_uses'] = None + + # set to None if unique (nullable) is None + # and model_fields_set contains the field + if self.unique is None and "unique" in self.model_fields_set: + _dict['unique'] = None + + # set to None if target_type (nullable) is None + # and model_fields_set contains the field + if self.target_type is None and "target_type" in self.model_fields_set: + _dict['target_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildInviteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildInviteRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "max_age": obj.get("max_age"), + "temporary": obj.get("temporary"), + "max_uses": obj.get("max_uses"), + "unique": obj.get("unique"), + "target_user_id": obj.get("target_user_id"), + "target_application_id": obj.get("target_application_id"), + "target_type": obj.get("target_type") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_request_channel_item.py b/dc_rest/models/create_guild_request_channel_item.py new file mode 100644 index 0000000..b08bff9 --- /dev/null +++ b/dc_rest/models/create_guild_request_channel_item.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildRequestChannelItem(BaseModel): + """ + CreateGuildRequestChannelItem + """ # noqa: E501 + type: Optional[StrictInt] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + topic: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=4096)]] = None + bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None + user_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + nsfw: Optional[StrictBool] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + permission_overwrites: Optional[Annotated[List[ChannelPermissionOverwriteRequest], Field(max_length=100)]] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + default_auto_archive_duration: Optional[StrictInt] = None + default_reaction_emoji: Optional[UpdateDefaultReactionEmojiRequest] = None + default_thread_rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + default_sort_order: Optional[StrictInt] = None + default_forum_layout: Optional[StrictInt] = None + default_tag_setting: Optional[StrictStr] = None + id: Optional[Annotated[str, Field(strict=True)]] = None + available_tags: Optional[Annotated[List[CreateOrUpdateThreadTagRequest], Field(max_length=20)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "permission_overwrites", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "id", "available_tags"] + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildRequestChannelItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list) + _items = [] + if self.permission_overwrites: + for _item_permission_overwrites in self.permission_overwrites: + if _item_permission_overwrites: + _items.append(_item_permission_overwrites.to_dict()) + _dict['permission_overwrites'] = _items + # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji + if self.default_reaction_emoji: + _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list) + _items = [] + if self.available_tags: + for _item_available_tags in self.available_tags: + if _item_available_tags: + _items.append(_item_available_tags.to_dict()) + _dict['available_tags'] = _items + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if topic (nullable) is None + # and model_fields_set contains the field + if self.topic is None and "topic" in self.model_fields_set: + _dict['topic'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if permission_overwrites (nullable) is None + # and model_fields_set contains the field + if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set: + _dict['permission_overwrites'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if default_reaction_emoji (nullable) is None + # and model_fields_set contains the field + if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set: + _dict['default_reaction_emoji'] = None + + # set to None if default_thread_rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set: + _dict['default_thread_rate_limit_per_user'] = None + + # set to None if available_tags (nullable) is None + # and model_fields_set contains the field + if self.available_tags is None and "available_tags" in self.model_fields_set: + _dict['available_tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildRequestChannelItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildRequestChannelItem) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "position": obj.get("position"), + "topic": obj.get("topic"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "nsfw": obj.get("nsfw"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "parent_id": obj.get("parent_id"), + "permission_overwrites": [ChannelPermissionOverwriteRequest.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None, + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "default_auto_archive_duration": obj.get("default_auto_archive_duration"), + "default_reaction_emoji": UpdateDefaultReactionEmojiRequest.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None, + "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"), + "default_sort_order": obj.get("default_sort_order"), + "default_forum_layout": obj.get("default_forum_layout"), + "default_tag_setting": obj.get("default_tag_setting"), + "id": obj.get("id"), + "available_tags": [CreateOrUpdateThreadTagRequest.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/create_guild_request_role_item.py b/dc_rest/models/create_guild_request_role_item.py new file mode 100644 index 0000000..ea737ce --- /dev/null +++ b/dc_rest/models/create_guild_request_role_item.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildRequestRoleItem(BaseModel): + """ + CreateGuildRequestRoleItem + """ # noqa: E501 + id: StrictInt + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + permissions: Optional[StrictInt] = None + color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None + hoist: Optional[StrictBool] = None + mentionable: Optional[StrictBool] = None + unicode_emoji: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + __properties: ClassVar[List[str]] = ["id", "name", "permissions", "color", "hoist", "mentionable", "unicode_emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildRequestRoleItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if hoist (nullable) is None + # and model_fields_set contains the field + if self.hoist is None and "hoist" in self.model_fields_set: + _dict['hoist'] = None + + # set to None if mentionable (nullable) is None + # and model_fields_set contains the field + if self.mentionable is None and "mentionable" in self.model_fields_set: + _dict['mentionable'] = None + + # set to None if unicode_emoji (nullable) is None + # and model_fields_set contains the field + if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set: + _dict['unicode_emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildRequestRoleItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildRequestRoleItem) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "permissions": obj.get("permissions"), + "color": obj.get("color"), + "hoist": obj.get("hoist"), + "mentionable": obj.get("mentionable"), + "unicode_emoji": obj.get("unicode_emoji") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_role_request.py b/dc_rest/models/create_guild_role_request.py new file mode 100644 index 0000000..346a6ea --- /dev/null +++ b/dc_rest/models/create_guild_role_request.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildRoleRequest(BaseModel): + """ + CreateGuildRoleRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + permissions: Optional[StrictInt] = None + color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None + hoist: Optional[StrictBool] = None + mentionable: Optional[StrictBool] = None + icon: Optional[StrictStr] = None + unicode_emoji: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + __properties: ClassVar[List[str]] = ["name", "permissions", "color", "hoist", "mentionable", "icon", "unicode_emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildRoleRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if hoist (nullable) is None + # and model_fields_set contains the field + if self.hoist is None and "hoist" in self.model_fields_set: + _dict['hoist'] = None + + # set to None if mentionable (nullable) is None + # and model_fields_set contains the field + if self.mentionable is None and "mentionable" in self.model_fields_set: + _dict['mentionable'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if unicode_emoji (nullable) is None + # and model_fields_set contains the field + if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set: + _dict['unicode_emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildRoleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildRoleRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "permissions": obj.get("permissions"), + "color": obj.get("color"), + "hoist": obj.get("hoist"), + "mentionable": obj.get("mentionable"), + "icon": obj.get("icon"), + "unicode_emoji": obj.get("unicode_emoji") + }) + return _obj + + diff --git a/dc_rest/models/create_guild_scheduled_event_request.py b/dc_rest/models/create_guild_scheduled_event_request.py new file mode 100644 index 0000000..299ae90 --- /dev/null +++ b/dc_rest/models/create_guild_scheduled_event_request.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest +from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest +from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEGUILDSCHEDULEDEVENTREQUEST_ONE_OF_SCHEMAS = ["ExternalScheduledEventCreateRequest", "StageScheduledEventCreateRequest", "VoiceScheduledEventCreateRequest"] + +class CreateGuildScheduledEventRequest(BaseModel): + """ + CreateGuildScheduledEventRequest + """ + # data type: ExternalScheduledEventCreateRequest + oneof_schema_1_validator: Optional[ExternalScheduledEventCreateRequest] = None + # data type: StageScheduledEventCreateRequest + oneof_schema_2_validator: Optional[StageScheduledEventCreateRequest] = None + # data type: VoiceScheduledEventCreateRequest + oneof_schema_3_validator: Optional[VoiceScheduledEventCreateRequest] = None + actual_instance: Optional[Union[ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest]] = None + one_of_schemas: Set[str] = { "ExternalScheduledEventCreateRequest", "StageScheduledEventCreateRequest", "VoiceScheduledEventCreateRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateGuildScheduledEventRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ExternalScheduledEventCreateRequest + if not isinstance(v, ExternalScheduledEventCreateRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExternalScheduledEventCreateRequest`") + else: + match += 1 + # validate data type: StageScheduledEventCreateRequest + if not isinstance(v, StageScheduledEventCreateRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `StageScheduledEventCreateRequest`") + else: + match += 1 + # validate data type: VoiceScheduledEventCreateRequest + if not isinstance(v, VoiceScheduledEventCreateRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `VoiceScheduledEventCreateRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ExternalScheduledEventCreateRequest + try: + instance.actual_instance = ExternalScheduledEventCreateRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StageScheduledEventCreateRequest + try: + instance.actual_instance = StageScheduledEventCreateRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VoiceScheduledEventCreateRequest + try: + instance.actual_instance = VoiceScheduledEventCreateRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateGuildScheduledEventRequest with oneOf schemas: ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExternalScheduledEventCreateRequest, StageScheduledEventCreateRequest, VoiceScheduledEventCreateRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_guild_template_request.py b/dc_rest/models/create_guild_template_request.py new file mode 100644 index 0000000..625288d --- /dev/null +++ b/dc_rest/models/create_guild_template_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateGuildTemplateRequest(BaseModel): + """ + CreateGuildTemplateRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description: Optional[Annotated[str, Field(strict=True, max_length=120)]] = None + __properties: ClassVar[List[str]] = ["name", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateGuildTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateGuildTemplateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateGuildTemplateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/create_interaction_response_request.py b/dc_rest/models/create_interaction_response_request.py new file mode 100644 index 0000000..596e342 --- /dev/null +++ b/dc_rest/models/create_interaction_response_request.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest +from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest +from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest +from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest +from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest +from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CREATEINTERACTIONRESPONSEREQUEST_ANY_OF_SCHEMAS = ["ApplicationCommandAutocompleteCallbackRequest", "CreateMessageInteractionCallbackRequest", "LaunchActivityInteractionCallbackRequest", "ModalInteractionCallbackRequest", "PongInteractionCallbackRequest", "UpdateMessageInteractionCallbackRequest"] + +class CreateInteractionResponseRequest(BaseModel): + """ + CreateInteractionResponseRequest + """ + + # data type: ApplicationCommandAutocompleteCallbackRequest + anyof_schema_1_validator: Optional[ApplicationCommandAutocompleteCallbackRequest] = None + # data type: CreateMessageInteractionCallbackRequest + anyof_schema_2_validator: Optional[CreateMessageInteractionCallbackRequest] = None + # data type: LaunchActivityInteractionCallbackRequest + anyof_schema_3_validator: Optional[LaunchActivityInteractionCallbackRequest] = None + # data type: ModalInteractionCallbackRequest + anyof_schema_4_validator: Optional[ModalInteractionCallbackRequest] = None + # data type: PongInteractionCallbackRequest + anyof_schema_5_validator: Optional[PongInteractionCallbackRequest] = None + # data type: UpdateMessageInteractionCallbackRequest + anyof_schema_6_validator: Optional[UpdateMessageInteractionCallbackRequest] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "ApplicationCommandAutocompleteCallbackRequest", "CreateMessageInteractionCallbackRequest", "LaunchActivityInteractionCallbackRequest", "ModalInteractionCallbackRequest", "PongInteractionCallbackRequest", "UpdateMessageInteractionCallbackRequest" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = CreateInteractionResponseRequest.model_construct() + error_messages = [] + # validate data type: ApplicationCommandAutocompleteCallbackRequest + if not isinstance(v, ApplicationCommandAutocompleteCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandAutocompleteCallbackRequest`") + else: + return v + + # validate data type: CreateMessageInteractionCallbackRequest + if not isinstance(v, CreateMessageInteractionCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMessageInteractionCallbackRequest`") + else: + return v + + # validate data type: LaunchActivityInteractionCallbackRequest + if not isinstance(v, LaunchActivityInteractionCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `LaunchActivityInteractionCallbackRequest`") + else: + return v + + # validate data type: ModalInteractionCallbackRequest + if not isinstance(v, ModalInteractionCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ModalInteractionCallbackRequest`") + else: + return v + + # validate data type: PongInteractionCallbackRequest + if not isinstance(v, PongInteractionCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `PongInteractionCallbackRequest`") + else: + return v + + # validate data type: UpdateMessageInteractionCallbackRequest + if not isinstance(v, UpdateMessageInteractionCallbackRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateMessageInteractionCallbackRequest`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in CreateInteractionResponseRequest with anyOf schemas: ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[ApplicationCommandAutocompleteCallbackRequest] = None + try: + instance.actual_instance = ApplicationCommandAutocompleteCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[CreateMessageInteractionCallbackRequest] = None + try: + instance.actual_instance = CreateMessageInteractionCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[LaunchActivityInteractionCallbackRequest] = None + try: + instance.actual_instance = LaunchActivityInteractionCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_4_validator: Optional[ModalInteractionCallbackRequest] = None + try: + instance.actual_instance = ModalInteractionCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_5_validator: Optional[PongInteractionCallbackRequest] = None + try: + instance.actual_instance = PongInteractionCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_6_validator: Optional[UpdateMessageInteractionCallbackRequest] = None + try: + instance.actual_instance = UpdateMessageInteractionCallbackRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateInteractionResponseRequest with anyOf schemas: ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandAutocompleteCallbackRequest, CreateMessageInteractionCallbackRequest, LaunchActivityInteractionCallbackRequest, ModalInteractionCallbackRequest, PongInteractionCallbackRequest, UpdateMessageInteractionCallbackRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_lobby_request.py b/dc_rest/models/create_lobby_request.py new file mode 100644 index 0000000..ea04f3d --- /dev/null +++ b/dc_rest/models/create_lobby_request.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.lobby_member_request import LobbyMemberRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateLobbyRequest(BaseModel): + """ + CreateLobbyRequest + """ # noqa: E501 + idle_timeout_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=5)]] = None + members: Optional[Annotated[List[LobbyMemberRequest], Field(max_length=25)]] = None + metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + __properties: ClassVar[List[str]] = ["idle_timeout_seconds", "members", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateLobbyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # set to None if idle_timeout_seconds (nullable) is None + # and model_fields_set contains the field + if self.idle_timeout_seconds is None and "idle_timeout_seconds" in self.model_fields_set: + _dict['idle_timeout_seconds'] = None + + # set to None if members (nullable) is None + # and model_fields_set contains the field + if self.members is None and "members" in self.model_fields_set: + _dict['members'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateLobbyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateLobbyRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "idle_timeout_seconds": obj.get("idle_timeout_seconds"), + "members": [LobbyMemberRequest.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/dc_rest/models/create_message_interaction_callback_request.py b/dc_rest/models/create_message_interaction_callback_request.py new file mode 100644 index 0000000..b0bec7a --- /dev/null +++ b/dc_rest/models/create_message_interaction_callback_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateMessageInteractionCallbackRequest(BaseModel): + """ + CreateMessageInteractionCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + data: Optional[IncomingWebhookInteractionRequest] = None + __properties: ClassVar[List[str]] = ["type", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateMessageInteractionCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateMessageInteractionCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateMessageInteractionCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "data": IncomingWebhookInteractionRequest.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/create_message_interaction_callback_response.py b/dc_rest/models/create_message_interaction_callback_response.py new file mode 100644 index 0000000..579def5 --- /dev/null +++ b/dc_rest/models/create_message_interaction_callback_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_response import MessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class CreateMessageInteractionCallbackResponse(BaseModel): + """ + CreateMessageInteractionCallbackResponse + """ # noqa: E501 + type: Optional[StrictInt] + message: MessageResponse + __properties: ClassVar[List[str]] = ["type", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateMessageInteractionCallbackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateMessageInteractionCallbackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateMessageInteractionCallbackResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "message": MessageResponse.from_dict(obj["message"]) if obj.get("message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/create_or_join_lobby_request.py b/dc_rest/models/create_or_join_lobby_request.py new file mode 100644 index 0000000..1820944 --- /dev/null +++ b/dc_rest/models/create_or_join_lobby_request.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrJoinLobbyRequest(BaseModel): + """ + CreateOrJoinLobbyRequest + """ # noqa: E501 + idle_timeout_seconds: Optional[Annotated[int, Field(le=604800, strict=True, ge=5)]] = None + lobby_metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + member_metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + secret: Annotated[str, Field(strict=True, max_length=250)] + __properties: ClassVar[List[str]] = ["idle_timeout_seconds", "lobby_metadata", "member_metadata", "secret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOrJoinLobbyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if idle_timeout_seconds (nullable) is None + # and model_fields_set contains the field + if self.idle_timeout_seconds is None and "idle_timeout_seconds" in self.model_fields_set: + _dict['idle_timeout_seconds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOrJoinLobbyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateOrJoinLobbyRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "idle_timeout_seconds": obj.get("idle_timeout_seconds"), + "lobby_metadata": obj.get("lobby_metadata"), + "member_metadata": obj.get("member_metadata"), + "secret": obj.get("secret") + }) + return _obj + + diff --git a/dc_rest/models/create_or_update_thread_tag_request.py b/dc_rest/models/create_or_update_thread_tag_request.py new file mode 100644 index 0000000..8b075dd --- /dev/null +++ b/dc_rest/models/create_or_update_thread_tag_request.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrUpdateThreadTagRequest(BaseModel): + """ + CreateOrUpdateThreadTagRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=0, strict=True, max_length=20)] + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + moderated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "emoji_id", "emoji_name", "moderated"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOrUpdateThreadTagRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + # set to None if moderated (nullable) is None + # and model_fields_set contains the field + if self.moderated is None and "moderated" in self.model_fields_set: + _dict['moderated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOrUpdateThreadTagRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateOrUpdateThreadTagRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "moderated": obj.get("moderated") + }) + return _obj + + diff --git a/dc_rest/models/create_private_channel_request.py b/dc_rest/models/create_private_channel_request.py new file mode 100644 index 0000000..cdd77cb --- /dev/null +++ b/dc_rest/models/create_private_channel_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreatePrivateChannelRequest(BaseModel): + """ + CreatePrivateChannelRequest + """ # noqa: E501 + recipient_id: Optional[Annotated[str, Field(strict=True)]] = None + access_tokens: Optional[Annotated[List[Annotated[str, Field(strict=True, max_length=152133)]], Field(max_length=1521)]] = None + nicks: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=152133)]]]] = None + __properties: ClassVar[List[str]] = ["recipient_id", "access_tokens", "nicks"] + + @field_validator('recipient_id') + def recipient_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePrivateChannelRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if access_tokens (nullable) is None + # and model_fields_set contains the field + if self.access_tokens is None and "access_tokens" in self.model_fields_set: + _dict['access_tokens'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePrivateChannelRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreatePrivateChannelRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "recipient_id": obj.get("recipient_id"), + "access_tokens": obj.get("access_tokens"), + "nicks": obj.get("nicks") + }) + return _obj + + diff --git a/dc_rest/models/create_stage_instance_request.py b/dc_rest/models/create_stage_instance_request.py new file mode 100644 index 0000000..9e4984e --- /dev/null +++ b/dc_rest/models/create_stage_instance_request.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateStageInstanceRequest(BaseModel): + """ + CreateStageInstanceRequest + """ # noqa: E501 + topic: Annotated[str, Field(min_length=1, strict=True, max_length=120)] + channel_id: Annotated[str, Field(strict=True)] + privacy_level: Optional[StrictInt] = None + guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None + send_start_notification: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["topic", "channel_id", "privacy_level", "guild_scheduled_event_id", "send_start_notification"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_scheduled_event_id') + def guild_scheduled_event_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateStageInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if send_start_notification (nullable) is None + # and model_fields_set contains the field + if self.send_start_notification is None and "send_start_notification" in self.model_fields_set: + _dict['send_start_notification'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateStageInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateStageInstanceRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "topic": obj.get("topic"), + "channel_id": obj.get("channel_id"), + "privacy_level": obj.get("privacy_level"), + "guild_scheduled_event_id": obj.get("guild_scheduled_event_id"), + "send_start_notification": obj.get("send_start_notification") + }) + return _obj + + diff --git a/dc_rest/models/create_text_thread_with_message_request.py b/dc_rest/models/create_text_thread_with_message_request.py new file mode 100644 index 0000000..3128c33 --- /dev/null +++ b/dc_rest/models/create_text_thread_with_message_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateTextThreadWithMessageRequest(BaseModel): + """ + CreateTextThreadWithMessageRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + auto_archive_duration: Optional[StrictInt] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTextThreadWithMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTextThreadWithMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateTextThreadWithMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "auto_archive_duration": obj.get("auto_archive_duration"), + "rate_limit_per_user": obj.get("rate_limit_per_user") + }) + return _obj + + diff --git a/dc_rest/models/create_text_thread_without_message_request.py b/dc_rest/models/create_text_thread_without_message_request.py new file mode 100644 index 0000000..aa93e66 --- /dev/null +++ b/dc_rest/models/create_text_thread_without_message_request.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateTextThreadWithoutMessageRequest(BaseModel): + """ + CreateTextThreadWithoutMessageRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + auto_archive_duration: Optional[StrictInt] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + type: Optional[StrictInt] = None + invitable: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "auto_archive_duration", "rate_limit_per_user", "type", "invitable"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTextThreadWithoutMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if invitable (nullable) is None + # and model_fields_set contains the field + if self.invitable is None and "invitable" in self.model_fields_set: + _dict['invitable'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTextThreadWithoutMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateTextThreadWithoutMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "auto_archive_duration": obj.get("auto_archive_duration"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "type": obj.get("type"), + "invitable": obj.get("invitable") + }) + return _obj + + diff --git a/dc_rest/models/create_thread_request.py b/dc_rest/models/create_thread_request.py new file mode 100644 index 0000000..3491398 --- /dev/null +++ b/dc_rest/models/create_thread_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest +from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CREATETHREADREQUEST_ANY_OF_SCHEMAS = ["CreateForumThreadRequest", "CreateTextThreadWithoutMessageRequest"] + +class CreateThreadRequest(BaseModel): + """ + CreateThreadRequest + """ + + # data type: CreateForumThreadRequest + anyof_schema_1_validator: Optional[CreateForumThreadRequest] = None + # data type: CreateTextThreadWithoutMessageRequest + anyof_schema_2_validator: Optional[CreateTextThreadWithoutMessageRequest] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "CreateForumThreadRequest", "CreateTextThreadWithoutMessageRequest" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = CreateThreadRequest.model_construct() + error_messages = [] + # validate data type: CreateForumThreadRequest + if not isinstance(v, CreateForumThreadRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateForumThreadRequest`") + else: + return v + + # validate data type: CreateTextThreadWithoutMessageRequest + if not isinstance(v, CreateTextThreadWithoutMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateTextThreadWithoutMessageRequest`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in CreateThreadRequest with anyOf schemas: CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[CreateForumThreadRequest] = None + try: + instance.actual_instance = CreateForumThreadRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[CreateTextThreadWithoutMessageRequest] = None + try: + instance.actual_instance = CreateTextThreadWithoutMessageRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateThreadRequest with anyOf schemas: CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateForumThreadRequest, CreateTextThreadWithoutMessageRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/create_webhook_request.py b/dc_rest/models/create_webhook_request.py new file mode 100644 index 0000000..4f2b04a --- /dev/null +++ b/dc_rest/models/create_webhook_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateWebhookRequest(BaseModel): + """ + CreateWebhookRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True, max_length=80)] + avatar: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "avatar"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateWebhookRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateWebhookRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreateWebhookRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "avatar": obj.get("avatar") + }) + return _obj + + diff --git a/dc_rest/models/created_thread_response.py b/dc_rest/models/created_thread_response.py new file mode 100644 index 0000000..9440c58 --- /dev/null +++ b/dc_rest/models/created_thread_response.py @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class CreatedThreadResponse(BaseModel): + """ + CreatedThreadResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + last_message_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: StrictInt + last_pin_timestamp: Optional[datetime] = None + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + rate_limit_per_user: Optional[StrictInt] = None + bitrate: Optional[StrictInt] = None + user_limit: Optional[StrictInt] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + permissions: Optional[StrictStr] = None + owner_id: Annotated[str, Field(strict=True)] + thread_metadata: Optional[ThreadMetadataResponse] = None + message_count: StrictInt + member_count: StrictInt + total_message_sent: StrictInt + applied_tags: Optional[List[Annotated[str, Field(strict=True)]]] = None + member: Optional[ThreadMemberResponse] = None + __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "guild_id", "name", "parent_id", "rate_limit_per_user", "bitrate", "user_limit", "rtc_region", "video_quality_mode", "permissions", "owner_id", "thread_metadata", "message_count", "member_count", "total_message_sent", "applied_tags", "member"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('last_message_id') + def last_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatedThreadResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of thread_metadata + if self.thread_metadata: + _dict['thread_metadata'] = self.thread_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # set to None if last_pin_timestamp (nullable) is None + # and model_fields_set contains the field + if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set: + _dict['last_pin_timestamp'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + # set to None if thread_metadata (nullable) is None + # and model_fields_set contains the field + if self.thread_metadata is None and "thread_metadata" in self.model_fields_set: + _dict['thread_metadata'] = None + + # set to None if applied_tags (nullable) is None + # and model_fields_set contains the field + if self.applied_tags is None and "applied_tags" in self.model_fields_set: + _dict['applied_tags'] = None + + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedThreadResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in CreatedThreadResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "last_message_id": obj.get("last_message_id"), + "flags": obj.get("flags"), + "last_pin_timestamp": obj.get("last_pin_timestamp"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "permissions": obj.get("permissions"), + "owner_id": obj.get("owner_id"), + "thread_metadata": ThreadMetadataResponse.from_dict(obj["thread_metadata"]) if obj.get("thread_metadata") is not None else None, + "message_count": obj.get("message_count"), + "member_count": obj.get("member_count"), + "total_message_sent": obj.get("total_message_sent"), + "applied_tags": obj.get("applied_tags"), + "member": ThreadMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_list_trigger_metadata.py b/dc_rest/models/default_keyword_list_trigger_metadata.py new file mode 100644 index 0000000..611ae34 --- /dev/null +++ b/dc_rest/models/default_keyword_list_trigger_metadata.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DefaultKeywordListTriggerMetadata(BaseModel): + """ + DefaultKeywordListTriggerMetadata + """ # noqa: E501 + allow_list: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=1000)]] = None + presets: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["allow_list", "presets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultKeywordListTriggerMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if allow_list (nullable) is None + # and model_fields_set contains the field + if self.allow_list is None and "allow_list" in self.model_fields_set: + _dict['allow_list'] = None + + # set to None if presets (nullable) is None + # and model_fields_set contains the field + if self.presets is None and "presets" in self.model_fields_set: + _dict['presets'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultKeywordListTriggerMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultKeywordListTriggerMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "allow_list": obj.get("allow_list"), + "presets": obj.get("presets") + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_list_trigger_metadata_response.py b/dc_rest/models/default_keyword_list_trigger_metadata_response.py new file mode 100644 index 0000000..5a8bd62 --- /dev/null +++ b/dc_rest/models/default_keyword_list_trigger_metadata_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DefaultKeywordListTriggerMetadataResponse(BaseModel): + """ + DefaultKeywordListTriggerMetadataResponse + """ # noqa: E501 + allow_list: List[StrictStr] + presets: List[StrictInt] + __properties: ClassVar[List[str]] = ["allow_list", "presets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultKeywordListTriggerMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultKeywordListTriggerMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultKeywordListTriggerMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "allow_list": obj.get("allow_list"), + "presets": obj.get("presets") + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_list_upsert_request.py b/dc_rest/models/default_keyword_list_upsert_request.py new file mode 100644 index 0000000..95bb679 --- /dev/null +++ b/dc_rest/models/default_keyword_list_upsert_request.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class DefaultKeywordListUpsertRequest(BaseModel): + """ + DefaultKeywordListUpsertRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + event_type: StrictInt + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: StrictInt + trigger_metadata: DefaultKeywordListTriggerMetadata + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultKeywordListUpsertRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultKeywordListUpsertRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultKeywordListUpsertRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": DefaultKeywordListTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py b/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py new file mode 100644 index 0000000..d9196a4 --- /dev/null +++ b/dc_rest/models/default_keyword_list_upsert_request_actions_inner.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.block_message_action import BlockMessageAction +from dc_rest.models.flag_to_channel_action import FlagToChannelAction +from dc_rest.models.quarantine_user_action import QuarantineUserAction +from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DEFAULTKEYWORDLISTUPSERTREQUESTACTIONSINNER_ONE_OF_SCHEMAS = ["BlockMessageAction", "FlagToChannelAction", "QuarantineUserAction", "UserCommunicationDisabledAction"] + +class DefaultKeywordListUpsertRequestActionsInner(BaseModel): + """ + DefaultKeywordListUpsertRequestActionsInner + """ + # data type: BlockMessageAction + oneof_schema_1_validator: Optional[BlockMessageAction] = None + # data type: FlagToChannelAction + oneof_schema_2_validator: Optional[FlagToChannelAction] = None + # data type: QuarantineUserAction + oneof_schema_3_validator: Optional[QuarantineUserAction] = None + # data type: UserCommunicationDisabledAction + oneof_schema_4_validator: Optional[UserCommunicationDisabledAction] = None + actual_instance: Optional[Union[BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction]] = None + one_of_schemas: Set[str] = { "BlockMessageAction", "FlagToChannelAction", "QuarantineUserAction", "UserCommunicationDisabledAction" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DefaultKeywordListUpsertRequestActionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: BlockMessageAction + if not isinstance(v, BlockMessageAction): + error_messages.append(f"Error! Input type `{type(v)}` is not `BlockMessageAction`") + else: + match += 1 + # validate data type: FlagToChannelAction + if not isinstance(v, FlagToChannelAction): + error_messages.append(f"Error! Input type `{type(v)}` is not `FlagToChannelAction`") + else: + match += 1 + # validate data type: QuarantineUserAction + if not isinstance(v, QuarantineUserAction): + error_messages.append(f"Error! Input type `{type(v)}` is not `QuarantineUserAction`") + else: + match += 1 + # validate data type: UserCommunicationDisabledAction + if not isinstance(v, UserCommunicationDisabledAction): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserCommunicationDisabledAction`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into BlockMessageAction + try: + instance.actual_instance = BlockMessageAction.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FlagToChannelAction + try: + instance.actual_instance = FlagToChannelAction.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into QuarantineUserAction + try: + instance.actual_instance = QuarantineUserAction.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserCommunicationDisabledAction + try: + instance.actual_instance = UserCommunicationDisabledAction.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DefaultKeywordListUpsertRequestActionsInner with oneOf schemas: BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BlockMessageAction, FlagToChannelAction, QuarantineUserAction, UserCommunicationDisabledAction]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/default_keyword_list_upsert_request_partial.py b/dc_rest/models/default_keyword_list_upsert_request_partial.py new file mode 100644 index 0000000..8f700ab --- /dev/null +++ b/dc_rest/models/default_keyword_list_upsert_request_partial.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class DefaultKeywordListUpsertRequestPartial(BaseModel): + """ + DefaultKeywordListUpsertRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + event_type: Optional[StrictInt] = None + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: Optional[StrictInt] = None + trigger_metadata: Optional[DefaultKeywordListTriggerMetadata] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultKeywordListUpsertRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultKeywordListUpsertRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultKeywordListUpsertRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": DefaultKeywordListTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_rule_response.py b/dc_rest/models/default_keyword_rule_response.py new file mode 100644 index 0000000..7d2fe02 --- /dev/null +++ b/dc_rest/models/default_keyword_rule_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class DefaultKeywordRuleResponse(BaseModel): + """ + DefaultKeywordRuleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + creator_id: Annotated[str, Field(strict=True)] + name: StrictStr + event_type: StrictInt + actions: List[DefaultKeywordRuleResponseActionsInner] + trigger_type: StrictInt + enabled: Optional[StrictBool] = None + exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None + exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None + trigger_metadata: DefaultKeywordListTriggerMetadataResponse + __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultKeywordRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultKeywordRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultKeywordRuleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "creator_id": obj.get("creator_id"), + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "trigger_type": obj.get("trigger_type"), + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_metadata": DefaultKeywordListTriggerMetadataResponse.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/default_keyword_rule_response_actions_inner.py b/dc_rest/models/default_keyword_rule_response_actions_inner.py new file mode 100644 index 0000000..1390578 --- /dev/null +++ b/dc_rest/models/default_keyword_rule_response_actions_inner.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.block_message_action_response import BlockMessageActionResponse +from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse +from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse +from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DEFAULTKEYWORDRULERESPONSEACTIONSINNER_ONE_OF_SCHEMAS = ["BlockMessageActionResponse", "FlagToChannelActionResponse", "QuarantineUserActionResponse", "UserCommunicationDisabledActionResponse"] + +class DefaultKeywordRuleResponseActionsInner(BaseModel): + """ + DefaultKeywordRuleResponseActionsInner + """ + # data type: BlockMessageActionResponse + oneof_schema_1_validator: Optional[BlockMessageActionResponse] = None + # data type: FlagToChannelActionResponse + oneof_schema_2_validator: Optional[FlagToChannelActionResponse] = None + # data type: QuarantineUserActionResponse + oneof_schema_3_validator: Optional[QuarantineUserActionResponse] = None + # data type: UserCommunicationDisabledActionResponse + oneof_schema_4_validator: Optional[UserCommunicationDisabledActionResponse] = None + actual_instance: Optional[Union[BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse]] = None + one_of_schemas: Set[str] = { "BlockMessageActionResponse", "FlagToChannelActionResponse", "QuarantineUserActionResponse", "UserCommunicationDisabledActionResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DefaultKeywordRuleResponseActionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: BlockMessageActionResponse + if not isinstance(v, BlockMessageActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `BlockMessageActionResponse`") + else: + match += 1 + # validate data type: FlagToChannelActionResponse + if not isinstance(v, FlagToChannelActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `FlagToChannelActionResponse`") + else: + match += 1 + # validate data type: QuarantineUserActionResponse + if not isinstance(v, QuarantineUserActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `QuarantineUserActionResponse`") + else: + match += 1 + # validate data type: UserCommunicationDisabledActionResponse + if not isinstance(v, UserCommunicationDisabledActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserCommunicationDisabledActionResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into BlockMessageActionResponse + try: + instance.actual_instance = BlockMessageActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FlagToChannelActionResponse + try: + instance.actual_instance = FlagToChannelActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into QuarantineUserActionResponse + try: + instance.actual_instance = QuarantineUserActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserCommunicationDisabledActionResponse + try: + instance.actual_instance = UserCommunicationDisabledActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DefaultKeywordRuleResponseActionsInner with oneOf schemas: BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BlockMessageActionResponse, FlagToChannelActionResponse, QuarantineUserActionResponse, UserCommunicationDisabledActionResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/default_reaction_emoji_response.py b/dc_rest/models/default_reaction_emoji_response.py new file mode 100644 index 0000000..a9bf9ef --- /dev/null +++ b/dc_rest/models/default_reaction_emoji_response.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DefaultReactionEmojiResponse(BaseModel): + """ + DefaultReactionEmojiResponse + """ # noqa: E501 + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["emoji_id", "emoji_name"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultReactionEmojiResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultReactionEmojiResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DefaultReactionEmojiResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/discord_integration_response.py b/dc_rest/models/discord_integration_response.py new file mode 100644 index 0000000..f76fcb1 --- /dev/null +++ b/dc_rest/models/discord_integration_response.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from dc_rest.models.integration_application_response import IntegrationApplicationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class DiscordIntegrationResponse(BaseModel): + """ + DiscordIntegrationResponse + """ # noqa: E501 + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + enabled: Optional[StrictBool] = None + id: Annotated[str, Field(strict=True)] + application: IntegrationApplicationResponse + scopes: List[StrictStr] + user: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id", "application", "scopes", "user"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DiscordIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DiscordIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in DiscordIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, + "enabled": obj.get("enabled"), + "id": obj.get("id"), + "application": IntegrationApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "scopes": obj.get("scopes"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/edit_lobby_channel_link_request.py b/dc_rest/models/edit_lobby_channel_link_request.py new file mode 100644 index 0000000..d5ca162 --- /dev/null +++ b/dc_rest/models/edit_lobby_channel_link_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EditLobbyChannelLinkRequest(BaseModel): + """ + EditLobbyChannelLinkRequest + """ # noqa: E501 + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditLobbyChannelLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditLobbyChannelLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EditLobbyChannelLinkRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/embedded_activity_instance.py b/dc_rest/models/embedded_activity_instance.py new file mode 100644 index 0000000..4113a35 --- /dev/null +++ b/dc_rest/models/embedded_activity_instance.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation +from typing import Optional, Set +from typing_extensions import Self + +class EmbeddedActivityInstance(BaseModel): + """ + EmbeddedActivityInstance + """ # noqa: E501 + application_id: Annotated[str, Field(strict=True)] + instance_id: StrictStr + launch_id: StrictStr + location: Optional[EmbeddedActivityInstanceLocation] = None + users: List[Annotated[str, Field(strict=True)]] + __properties: ClassVar[List[str]] = ["application_id", "instance_id", "launch_id", "location", "users"] + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddedActivityInstance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of location + if self.location: + _dict['location'] = self.location.to_dict() + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict['location'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddedActivityInstance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EmbeddedActivityInstance) in the input: " + _key) + + _obj = cls.model_validate({ + "application_id": obj.get("application_id"), + "instance_id": obj.get("instance_id"), + "launch_id": obj.get("launch_id"), + "location": EmbeddedActivityInstanceLocation.from_dict(obj["location"]) if obj.get("location") is not None else None, + "users": obj.get("users") + }) + return _obj + + diff --git a/dc_rest/models/embedded_activity_instance_location.py b/dc_rest/models/embedded_activity_instance_location.py new file mode 100644 index 0000000..863aa6a --- /dev/null +++ b/dc_rest/models/embedded_activity_instance_location.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.guild_channel_location import GuildChannelLocation +from dc_rest.models.private_channel_location import PrivateChannelLocation +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +EMBEDDEDACTIVITYINSTANCELOCATION_ONE_OF_SCHEMAS = ["GuildChannelLocation", "PrivateChannelLocation"] + +class EmbeddedActivityInstanceLocation(BaseModel): + """ + EmbeddedActivityInstanceLocation + """ + # data type: GuildChannelLocation + oneof_schema_1_validator: Optional[GuildChannelLocation] = None + # data type: PrivateChannelLocation + oneof_schema_2_validator: Optional[PrivateChannelLocation] = None + actual_instance: Optional[Union[GuildChannelLocation, PrivateChannelLocation]] = None + one_of_schemas: Set[str] = { "GuildChannelLocation", "PrivateChannelLocation" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = EmbeddedActivityInstanceLocation.model_construct() + error_messages = [] + match = 0 + # validate data type: GuildChannelLocation + if not isinstance(v, GuildChannelLocation): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildChannelLocation`") + else: + match += 1 + # validate data type: PrivateChannelLocation + if not isinstance(v, PrivateChannelLocation): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelLocation`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into GuildChannelLocation + try: + instance.actual_instance = GuildChannelLocation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PrivateChannelLocation + try: + instance.actual_instance = PrivateChannelLocation.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EmbeddedActivityInstanceLocation with oneOf schemas: GuildChannelLocation, PrivateChannelLocation. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], GuildChannelLocation, PrivateChannelLocation]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/emoji_response.py b/dc_rest/models/emoji_response.py new file mode 100644 index 0000000..ba3e125 --- /dev/null +++ b/dc_rest/models/emoji_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class EmojiResponse(BaseModel): + """ + EmojiResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + user: Optional[UserResponse] = None + roles: List[Annotated[str, Field(strict=True)]] + require_colons: StrictBool + managed: StrictBool + animated: StrictBool + available: StrictBool + __properties: ClassVar[List[str]] = ["id", "name", "user", "roles", "require_colons", "managed", "animated", "available"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmojiResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmojiResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EmojiResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "roles": obj.get("roles"), + "require_colons": obj.get("require_colons"), + "managed": obj.get("managed"), + "animated": obj.get("animated"), + "available": obj.get("available") + }) + return _obj + + diff --git a/dc_rest/models/entitlement_response.py b/dc_rest/models/entitlement_response.py new file mode 100644 index 0000000..c830673 --- /dev/null +++ b/dc_rest/models/entitlement_response.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EntitlementResponse(BaseModel): + """ + EntitlementResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + sku_id: Annotated[str, Field(strict=True)] + application_id: Annotated[str, Field(strict=True)] + user_id: Annotated[str, Field(strict=True)] + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + deleted: StrictBool + starts_at: Optional[datetime] = None + ends_at: Optional[datetime] = None + type: Optional[StrictInt] + fulfilled_at: Optional[datetime] = None + fulfillment_status: Optional[StrictInt] = None + consumed: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "sku_id", "application_id", "user_id", "guild_id", "deleted", "starts_at", "ends_at", "type", "fulfilled_at", "fulfillment_status", "consumed"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('user_id') + def user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntitlementResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if starts_at (nullable) is None + # and model_fields_set contains the field + if self.starts_at is None and "starts_at" in self.model_fields_set: + _dict['starts_at'] = None + + # set to None if ends_at (nullable) is None + # and model_fields_set contains the field + if self.ends_at is None and "ends_at" in self.model_fields_set: + _dict['ends_at'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if fulfilled_at (nullable) is None + # and model_fields_set contains the field + if self.fulfilled_at is None and "fulfilled_at" in self.model_fields_set: + _dict['fulfilled_at'] = None + + # set to None if fulfillment_status (nullable) is None + # and model_fields_set contains the field + if self.fulfillment_status is None and "fulfillment_status" in self.model_fields_set: + _dict['fulfillment_status'] = None + + # set to None if consumed (nullable) is None + # and model_fields_set contains the field + if self.consumed is None and "consumed" in self.model_fields_set: + _dict['consumed'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntitlementResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EntitlementResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sku_id": obj.get("sku_id"), + "application_id": obj.get("application_id"), + "user_id": obj.get("user_id"), + "guild_id": obj.get("guild_id"), + "deleted": obj.get("deleted"), + "starts_at": obj.get("starts_at"), + "ends_at": obj.get("ends_at"), + "type": obj.get("type"), + "fulfilled_at": obj.get("fulfilled_at"), + "fulfillment_status": obj.get("fulfillment_status"), + "consumed": obj.get("consumed") + }) + return _obj + + diff --git a/dc_rest/models/entity_metadata_external.py b/dc_rest/models/entity_metadata_external.py new file mode 100644 index 0000000..d9e7176 --- /dev/null +++ b/dc_rest/models/entity_metadata_external.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EntityMetadataExternal(BaseModel): + """ + EntityMetadataExternal + """ # noqa: E501 + location: Annotated[str, Field(strict=True, max_length=100)] + __properties: ClassVar[List[str]] = ["location"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntityMetadataExternal from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntityMetadataExternal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EntityMetadataExternal) in the input: " + _key) + + _obj = cls.model_validate({ + "location": obj.get("location") + }) + return _obj + + diff --git a/dc_rest/models/entity_metadata_external_response.py b/dc_rest/models/entity_metadata_external_response.py new file mode 100644 index 0000000..8279610 --- /dev/null +++ b/dc_rest/models/entity_metadata_external_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EntityMetadataExternalResponse(BaseModel): + """ + EntityMetadataExternalResponse + """ # noqa: E501 + location: StrictStr + __properties: ClassVar[List[str]] = ["location"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntityMetadataExternalResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntityMetadataExternalResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in EntityMetadataExternalResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "location": obj.get("location") + }) + return _obj + + diff --git a/dc_rest/models/error.py b/dc_rest/models/error.py new file mode 100644 index 0000000..19a1510 --- /dev/null +++ b/dc_rest/models/error.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + A single error, either for an API response or a specific field. + """ # noqa: E501 + code: StrictInt = Field(description="Discord internal error code. See error code reference") + message: StrictStr = Field(description="Human-readable error message") + __properties: ClassVar[List[str]] = ["code", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in Error) in the input: " + _key) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message") + }) + return _obj + + diff --git a/dc_rest/models/error_details.py b/dc_rest/models/error_details.py new file mode 100644 index 0000000..ddd8a7a --- /dev/null +++ b/dc_rest/models/error_details.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, Dict, List, Optional +from dc_rest.models.inner_errors import InnerErrors +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ERRORDETAILS_ONE_OF_SCHEMAS = ["Dict[str, ErrorDetails]", "InnerErrors"] + +class ErrorDetails(BaseModel): + """ + ErrorDetails + """ + # data type: Dict[str, ErrorDetails] + oneof_schema_1_validator: Optional[Dict[str, ErrorDetails]] = None + # data type: InnerErrors + oneof_schema_2_validator: Optional[InnerErrors] = None + actual_instance: Optional[Union[Dict[str, ErrorDetails], InnerErrors]] = None + one_of_schemas: Set[str] = { "Dict[str, ErrorDetails]", "InnerErrors" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ErrorDetails.model_construct() + error_messages = [] + match = 0 + # validate data type: Dict[str, ErrorDetails] + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: InnerErrors + if not isinstance(v, InnerErrors): + error_messages.append(f"Error! Input type `{type(v)}` is not `InnerErrors`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Dict[str, ErrorDetails] + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InnerErrors + try: + instance.actual_instance = InnerErrors.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ErrorDetails with oneOf schemas: Dict[str, ErrorDetails], InnerErrors. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, ErrorDetails], InnerErrors]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +# TODO: Rewrite to not use raise_errors +ErrorDetails.model_rebuild(raise_errors=False) + diff --git a/dc_rest/models/error_response.py b/dc_rest/models/error_response.py new file mode 100644 index 0000000..e51005a --- /dev/null +++ b/dc_rest/models/error_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.error_details import ErrorDetails +from typing import Optional, Set +from typing_extensions import Self + +class ErrorResponse(BaseModel): + """ + Errors object returned by the Discord API + """ # noqa: E501 + code: StrictInt = Field(description="Discord internal error code. See error code reference") + message: StrictStr = Field(description="Human-readable error message") + errors: Optional[ErrorDetails] = None + __properties: ClassVar[List[str]] = ["code", "message", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of errors + if self.errors: + _dict['errors'] = self.errors.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ErrorResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "errors": ErrorDetails.from_dict(obj["errors"]) if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/execute_webhook_request.py b/dc_rest/models/execute_webhook_request.py new file mode 100644 index 0000000..9297dd5 --- /dev/null +++ b/dc_rest/models/execute_webhook_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +EXECUTEWEBHOOKREQUEST_ANY_OF_SCHEMAS = ["IncomingWebhookRequestPartial", "IncomingWebhookUpdateRequestPartial"] + +class ExecuteWebhookRequest(BaseModel): + """ + ExecuteWebhookRequest + """ + + # data type: IncomingWebhookRequestPartial + anyof_schema_1_validator: Optional[IncomingWebhookRequestPartial] = None + # data type: IncomingWebhookUpdateRequestPartial + anyof_schema_2_validator: Optional[IncomingWebhookUpdateRequestPartial] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "IncomingWebhookRequestPartial", "IncomingWebhookUpdateRequestPartial" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ExecuteWebhookRequest.model_construct() + error_messages = [] + # validate data type: IncomingWebhookRequestPartial + if not isinstance(v, IncomingWebhookRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `IncomingWebhookRequestPartial`") + else: + return v + + # validate data type: IncomingWebhookUpdateRequestPartial + if not isinstance(v, IncomingWebhookUpdateRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `IncomingWebhookUpdateRequestPartial`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ExecuteWebhookRequest with anyOf schemas: IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[IncomingWebhookRequestPartial] = None + try: + instance.actual_instance = IncomingWebhookRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[IncomingWebhookUpdateRequestPartial] = None + try: + instance.actual_instance = IncomingWebhookUpdateRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ExecuteWebhookRequest with anyOf schemas: IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IncomingWebhookRequestPartial, IncomingWebhookUpdateRequestPartial]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/external_connection_integration_response.py b/dc_rest/models/external_connection_integration_response.py new file mode 100644 index 0000000..21db8f3 --- /dev/null +++ b/dc_rest/models/external_connection_integration_response.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ExternalConnectionIntegrationResponse(BaseModel): + """ + ExternalConnectionIntegrationResponse + """ # noqa: E501 + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + enabled: Optional[StrictBool] = None + id: StrictStr + user: UserResponse + revoked: Optional[StrictBool] = None + expire_behavior: Optional[StrictInt] = None + expire_grace_period: Optional[StrictInt] = None + subscriber_count: Optional[StrictInt] = None + synced_at: Optional[datetime] = None + role_id: Optional[Annotated[str, Field(strict=True)]] = None + syncing: Optional[StrictBool] = None + enable_emoticons: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id", "user", "revoked", "expire_behavior", "expire_grace_period", "subscriber_count", "synced_at", "role_id", "syncing", "enable_emoticons"] + + @field_validator('role_id') + def role_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExternalConnectionIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if revoked (nullable) is None + # and model_fields_set contains the field + if self.revoked is None and "revoked" in self.model_fields_set: + _dict['revoked'] = None + + # set to None if subscriber_count (nullable) is None + # and model_fields_set contains the field + if self.subscriber_count is None and "subscriber_count" in self.model_fields_set: + _dict['subscriber_count'] = None + + # set to None if synced_at (nullable) is None + # and model_fields_set contains the field + if self.synced_at is None and "synced_at" in self.model_fields_set: + _dict['synced_at'] = None + + # set to None if syncing (nullable) is None + # and model_fields_set contains the field + if self.syncing is None and "syncing" in self.model_fields_set: + _dict['syncing'] = None + + # set to None if enable_emoticons (nullable) is None + # and model_fields_set contains the field + if self.enable_emoticons is None and "enable_emoticons" in self.model_fields_set: + _dict['enable_emoticons'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExternalConnectionIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ExternalConnectionIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, + "enabled": obj.get("enabled"), + "id": obj.get("id"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "revoked": obj.get("revoked"), + "expire_behavior": obj.get("expire_behavior"), + "expire_grace_period": obj.get("expire_grace_period"), + "subscriber_count": obj.get("subscriber_count"), + "synced_at": obj.get("synced_at"), + "role_id": obj.get("role_id"), + "syncing": obj.get("syncing"), + "enable_emoticons": obj.get("enable_emoticons") + }) + return _obj + + diff --git a/dc_rest/models/external_scheduled_event_create_request.py b/dc_rest/models/external_scheduled_event_create_request.py new file mode 100644 index 0000000..d6b7139 --- /dev/null +++ b/dc_rest/models/external_scheduled_event_create_request.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.entity_metadata_external import EntityMetadataExternal +from typing import Optional, Set +from typing_extensions import Self + +class ExternalScheduledEventCreateRequest(BaseModel): + """ + ExternalScheduledEventCreateRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + privacy_level: Optional[Any] + entity_type: Optional[StrictInt] + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: EntityMetadataExternal + __properties: ClassVar[List[str]] = ["name", "description", "image", "scheduled_start_time", "scheduled_end_time", "privacy_level", "entity_type", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExternalScheduledEventCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of entity_metadata + if self.entity_metadata: + _dict['entity_metadata'] = self.entity_metadata.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExternalScheduledEventCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "privacy_level": obj.get("privacy_level"), + "entity_type": obj.get("entity_type"), + "channel_id": obj.get("channel_id"), + "entity_metadata": EntityMetadataExternal.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/external_scheduled_event_patch_request_partial.py b/dc_rest/models/external_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..7dc6f58 --- /dev/null +++ b/dc_rest/models/external_scheduled_event_patch_request_partial.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.entity_metadata_external import EntityMetadataExternal +from typing import Optional, Set +from typing_extensions import Self + +class ExternalScheduledEventPatchRequestPartial(BaseModel): + """ + ExternalScheduledEventPatchRequestPartial + """ # noqa: E501 + status: Optional[StrictInt] = None + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: Optional[datetime] = None + scheduled_end_time: Optional[datetime] = None + entity_type: Optional[StrictInt] = None + privacy_level: Optional[Any] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: Optional[EntityMetadataExternal] = None + __properties: ClassVar[List[str]] = ["status", "name", "description", "image", "scheduled_start_time", "scheduled_end_time", "entity_type", "privacy_level", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExternalScheduledEventPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of entity_metadata + if self.entity_metadata: + _dict['entity_metadata'] = self.entity_metadata.to_dict() + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExternalScheduledEventPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "entity_type": obj.get("entity_type"), + "privacy_level": obj.get("privacy_level"), + "channel_id": obj.get("channel_id"), + "entity_metadata": EntityMetadataExternal.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/external_scheduled_event_response.py b/dc_rest/models/external_scheduled_event_response.py new file mode 100644 index 0000000..ca118a1 --- /dev/null +++ b/dc_rest/models/external_scheduled_event_response.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ExternalScheduledEventResponse(BaseModel): + """ + ExternalScheduledEventResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + creator_id: Optional[Annotated[str, Field(strict=True)]] = None + creator: Optional[UserResponse] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + status: Optional[StrictInt] + entity_type: Optional[StrictInt] + entity_id: Optional[Annotated[str, Field(strict=True)]] = None + user_count: Optional[StrictInt] = None + privacy_level: Optional[Any] + user_rsvp: Optional[ScheduledEventUserResponse] = None + entity_metadata: EntityMetadataExternalResponse + __properties: ClassVar[List[str]] = ["id", "guild_id", "name", "description", "channel_id", "creator_id", "creator", "image", "scheduled_start_time", "scheduled_end_time", "status", "entity_type", "entity_id", "user_count", "privacy_level", "user_rsvp", "entity_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('entity_id') + def entity_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExternalScheduledEventResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator + if self.creator: + _dict['creator'] = self.creator.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_rsvp + if self.user_rsvp: + _dict['user_rsvp'] = self.user_rsvp.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_metadata + if self.entity_metadata: + _dict['entity_metadata'] = self.entity_metadata.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creator (nullable) is None + # and model_fields_set contains the field + if self.creator is None and "creator" in self.model_fields_set: + _dict['creator'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if user_count (nullable) is None + # and model_fields_set contains the field + if self.user_count is None and "user_count" in self.model_fields_set: + _dict['user_count'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if user_rsvp (nullable) is None + # and model_fields_set contains the field + if self.user_rsvp is None and "user_rsvp" in self.model_fields_set: + _dict['user_rsvp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExternalScheduledEventResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ExternalScheduledEventResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "channel_id": obj.get("channel_id"), + "creator_id": obj.get("creator_id"), + "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None, + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "status": obj.get("status"), + "entity_type": obj.get("entity_type"), + "entity_id": obj.get("entity_id"), + "user_count": obj.get("user_count"), + "privacy_level": obj.get("privacy_level"), + "user_rsvp": ScheduledEventUserResponse.from_dict(obj["user_rsvp"]) if obj.get("user_rsvp") is not None else None, + "entity_metadata": EntityMetadataExternalResponse.from_dict(obj["entity_metadata"]) if obj.get("entity_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/file_component_for_message_request.py b/dc_rest/models/file_component_for_message_request.py new file mode 100644 index 0000000..6f23e4e --- /dev/null +++ b/dc_rest/models/file_component_for_message_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired +from typing import Optional, Set +from typing_extensions import Self + +class FileComponentForMessageRequest(BaseModel): + """ + FileComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + spoiler: Optional[StrictBool] = None + file: UnfurledMediaRequestWithAttachmentReferenceRequired + __properties: ClassVar[List[str]] = ["type", "spoiler", "file"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of file + if self.file: + _dict['file'] = self.file.to_dict() + # set to None if spoiler (nullable) is None + # and model_fields_set contains the field + if self.spoiler is None and "spoiler" in self.model_fields_set: + _dict['spoiler'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FileComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "spoiler": obj.get("spoiler"), + "file": UnfurledMediaRequestWithAttachmentReferenceRequired.from_dict(obj["file"]) if obj.get("file") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/file_component_response.py b/dc_rest/models/file_component_response.py new file mode 100644 index 0000000..2c9e0a3 --- /dev/null +++ b/dc_rest/models/file_component_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse +from typing import Optional, Set +from typing_extensions import Self + +class FileComponentResponse(BaseModel): + """ + FileComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + file: UnfurledMediaResponse + name: Optional[StrictStr] = None + size: Optional[StrictInt] = None + spoiler: StrictBool + __properties: ClassVar[List[str]] = ["type", "id", "file", "name", "size", "spoiler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of file + if self.file: + _dict['file'] = self.file.to_dict() + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FileComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "file": UnfurledMediaResponse.from_dict(obj["file"]) if obj.get("file") is not None else None, + "name": obj.get("name"), + "size": obj.get("size"), + "spoiler": obj.get("spoiler") + }) + return _obj + + diff --git a/dc_rest/models/flag_to_channel_action.py b/dc_rest/models/flag_to_channel_action.py new file mode 100644 index 0000000..5f09584 --- /dev/null +++ b/dc_rest/models/flag_to_channel_action.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata +from typing import Optional, Set +from typing_extensions import Self + +class FlagToChannelAction(BaseModel): + """ + FlagToChannelAction + """ # noqa: E501 + type: StrictInt + metadata: FlagToChannelActionMetadata + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlagToChannelAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlagToChannelAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FlagToChannelAction) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": FlagToChannelActionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/flag_to_channel_action_metadata.py b/dc_rest/models/flag_to_channel_action_metadata.py new file mode 100644 index 0000000..dd7abbd --- /dev/null +++ b/dc_rest/models/flag_to_channel_action_metadata.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FlagToChannelActionMetadata(BaseModel): + """ + FlagToChannelActionMetadata + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlagToChannelActionMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlagToChannelActionMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FlagToChannelActionMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/flag_to_channel_action_metadata_response.py b/dc_rest/models/flag_to_channel_action_metadata_response.py new file mode 100644 index 0000000..8baffd9 --- /dev/null +++ b/dc_rest/models/flag_to_channel_action_metadata_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FlagToChannelActionMetadataResponse(BaseModel): + """ + FlagToChannelActionMetadataResponse + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlagToChannelActionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlagToChannelActionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FlagToChannelActionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/flag_to_channel_action_response.py b/dc_rest/models/flag_to_channel_action_response.py new file mode 100644 index 0000000..4735259 --- /dev/null +++ b/dc_rest/models/flag_to_channel_action_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class FlagToChannelActionResponse(BaseModel): + """ + FlagToChannelActionResponse + """ # noqa: E501 + type: StrictInt + metadata: FlagToChannelActionMetadataResponse + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlagToChannelActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlagToChannelActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FlagToChannelActionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": FlagToChannelActionMetadataResponse.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/follow_channel_request.py b/dc_rest/models/follow_channel_request.py new file mode 100644 index 0000000..d812202 --- /dev/null +++ b/dc_rest/models/follow_channel_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FollowChannelRequest(BaseModel): + """ + FollowChannelRequest + """ # noqa: E501 + webhook_channel_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["webhook_channel_id"] + + @field_validator('webhook_channel_id') + def webhook_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FollowChannelRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FollowChannelRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FollowChannelRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "webhook_channel_id": obj.get("webhook_channel_id") + }) + return _obj + + diff --git a/dc_rest/models/forum_tag_response.py b/dc_rest/models/forum_tag_response.py new file mode 100644 index 0000000..a68ac18 --- /dev/null +++ b/dc_rest/models/forum_tag_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ForumTagResponse(BaseModel): + """ + ForumTagResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + moderated: StrictBool + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name", "moderated", "emoji_id", "emoji_name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ForumTagResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ForumTagResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ForumTagResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "moderated": obj.get("moderated"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/friend_invite_response.py b/dc_rest/models/friend_invite_response.py new file mode 100644 index 0000000..475d627 --- /dev/null +++ b/dc_rest/models/friend_invite_response.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.invite_channel_response import InviteChannelResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class FriendInviteResponse(BaseModel): + """ + FriendInviteResponse + """ # noqa: E501 + type: Optional[StrictInt] = None + code: StrictStr + inviter: Optional[UserResponse] = None + max_age: Optional[StrictInt] = None + created_at: Optional[datetime] = None + expires_at: Optional[datetime] = None + friends_count: Optional[StrictInt] = None + channel: Optional[InviteChannelResponse] = None + is_contact: Optional[StrictBool] = None + uses: Optional[StrictInt] = None + max_uses: Optional[StrictInt] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "friends_count", "channel", "is_contact", "uses", "max_uses", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FriendInviteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inviter + if self.inviter: + _dict['inviter'] = self.inviter.to_dict() + # override the default output from pydantic by calling `to_dict()` of channel + if self.channel: + _dict['channel'] = self.channel.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if inviter (nullable) is None + # and model_fields_set contains the field + if self.inviter is None and "inviter" in self.model_fields_set: + _dict['inviter'] = None + + # set to None if max_age (nullable) is None + # and model_fields_set contains the field + if self.max_age is None and "max_age" in self.model_fields_set: + _dict['max_age'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if friends_count (nullable) is None + # and model_fields_set contains the field + if self.friends_count is None and "friends_count" in self.model_fields_set: + _dict['friends_count'] = None + + # set to None if channel (nullable) is None + # and model_fields_set contains the field + if self.channel is None and "channel" in self.model_fields_set: + _dict['channel'] = None + + # set to None if is_contact (nullable) is None + # and model_fields_set contains the field + if self.is_contact is None and "is_contact" in self.model_fields_set: + _dict['is_contact'] = None + + # set to None if uses (nullable) is None + # and model_fields_set contains the field + if self.uses is None and "uses" in self.model_fields_set: + _dict['uses'] = None + + # set to None if max_uses (nullable) is None + # and model_fields_set contains the field + if self.max_uses is None and "max_uses" in self.model_fields_set: + _dict['max_uses'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FriendInviteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in FriendInviteResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "code": obj.get("code"), + "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None, + "max_age": obj.get("max_age"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "friends_count": obj.get("friends_count"), + "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None, + "is_contact": obj.get("is_contact"), + "uses": obj.get("uses"), + "max_uses": obj.get("max_uses"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/gateway_bot_response.py b/dc_rest/models/gateway_bot_response.py new file mode 100644 index 0000000..f3a26d1 --- /dev/null +++ b/dc_rest/models/gateway_bot_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse +from typing import Optional, Set +from typing_extensions import Self + +class GatewayBotResponse(BaseModel): + """ + GatewayBotResponse + """ # noqa: E501 + url: StrictStr + session_start_limit: GatewayBotSessionStartLimitResponse + shards: StrictInt + __properties: ClassVar[List[str]] = ["url", "session_start_limit", "shards"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GatewayBotResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session_start_limit + if self.session_start_limit: + _dict['session_start_limit'] = self.session_start_limit.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GatewayBotResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GatewayBotResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "session_start_limit": GatewayBotSessionStartLimitResponse.from_dict(obj["session_start_limit"]) if obj.get("session_start_limit") is not None else None, + "shards": obj.get("shards") + }) + return _obj + + diff --git a/dc_rest/models/gateway_bot_session_start_limit_response.py b/dc_rest/models/gateway_bot_session_start_limit_response.py new file mode 100644 index 0000000..6bde2b9 --- /dev/null +++ b/dc_rest/models/gateway_bot_session_start_limit_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GatewayBotSessionStartLimitResponse(BaseModel): + """ + GatewayBotSessionStartLimitResponse + """ # noqa: E501 + max_concurrency: StrictInt + remaining: StrictInt + reset_after: StrictInt + total: StrictInt + __properties: ClassVar[List[str]] = ["max_concurrency", "remaining", "reset_after", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GatewayBotSessionStartLimitResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GatewayBotSessionStartLimitResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GatewayBotSessionStartLimitResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "max_concurrency": obj.get("max_concurrency"), + "remaining": obj.get("remaining"), + "reset_after": obj.get("reset_after"), + "total": obj.get("total") + }) + return _obj + + diff --git a/dc_rest/models/gateway_response.py b/dc_rest/models/gateway_response.py new file mode 100644 index 0000000..b8263c2 --- /dev/null +++ b/dc_rest/models/gateway_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GatewayResponse(BaseModel): + """ + GatewayResponse + """ # noqa: E501 + url: StrictStr + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GatewayResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GatewayResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GatewayResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/get_channel200_response.py b/dc_rest/models/get_channel200_response.py new file mode 100644 index 0000000..1283b28 --- /dev/null +++ b/dc_rest/models/get_channel200_response.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.guild_channel_response import GuildChannelResponse +from dc_rest.models.private_channel_response import PrivateChannelResponse +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse +from dc_rest.models.thread_response import ThreadResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GETCHANNEL200RESPONSE_ONE_OF_SCHEMAS = ["GuildChannelResponse", "PrivateChannelResponse", "PrivateGroupChannelResponse", "ThreadResponse"] + +class GetChannel200Response(BaseModel): + """ + GetChannel200Response + """ + # data type: GuildChannelResponse + oneof_schema_1_validator: Optional[GuildChannelResponse] = None + # data type: PrivateChannelResponse + oneof_schema_2_validator: Optional[PrivateChannelResponse] = None + # data type: PrivateGroupChannelResponse + oneof_schema_3_validator: Optional[PrivateGroupChannelResponse] = None + # data type: ThreadResponse + oneof_schema_4_validator: Optional[ThreadResponse] = None + actual_instance: Optional[Union[GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse]] = None + one_of_schemas: Set[str] = { "GuildChannelResponse", "PrivateChannelResponse", "PrivateGroupChannelResponse", "ThreadResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GetChannel200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: GuildChannelResponse + if not isinstance(v, GuildChannelResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildChannelResponse`") + else: + match += 1 + # validate data type: PrivateChannelResponse + if not isinstance(v, PrivateChannelResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateChannelResponse`") + else: + match += 1 + # validate data type: PrivateGroupChannelResponse + if not isinstance(v, PrivateGroupChannelResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrivateGroupChannelResponse`") + else: + match += 1 + # validate data type: ThreadResponse + if not isinstance(v, ThreadResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ThreadResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into GuildChannelResponse + try: + instance.actual_instance = GuildChannelResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PrivateChannelResponse + try: + instance.actual_instance = PrivateChannelResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PrivateGroupChannelResponse + try: + instance.actual_instance = PrivateGroupChannelResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ThreadResponse + try: + instance.actual_instance = ThreadResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GetChannel200Response with oneOf schemas: GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], GuildChannelResponse, PrivateChannelResponse, PrivateGroupChannelResponse, ThreadResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/get_entitlements_sku_ids_parameter.py b/dc_rest/models/get_entitlements_sku_ids_parameter.py new file mode 100644 index 0000000..0505b03 --- /dev/null +++ b/dc_rest/models/get_entitlements_sku_ids_parameter.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GETENTITLEMENTSSKUIDSPARAMETER_ONE_OF_SCHEMAS = ["List[Optional[str]]", "str"] + +class GetEntitlementsSkuIdsParameter(BaseModel): + """ + GetEntitlementsSkuIdsParameter + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: List[Optional[str]] + oneof_schema_2_validator: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=100)]] = None + actual_instance: Optional[Union[List[Optional[str]], str]] = None + one_of_schemas: Set[str] = { "List[Optional[str]]", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GetEntitlementsSkuIdsParameter.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[Optional[str]] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[Optional[str]] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GetEntitlementsSkuIdsParameter with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[Optional[str]], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/get_sticker200_response.py b/dc_rest/models/get_sticker200_response.py new file mode 100644 index 0000000..2c74448 --- /dev/null +++ b/dc_rest/models/get_sticker200_response.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.models.standard_sticker_response import StandardStickerResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GETSTICKER200RESPONSE_ONE_OF_SCHEMAS = ["GuildStickerResponse", "StandardStickerResponse"] + +class GetSticker200Response(BaseModel): + """ + GetSticker200Response + """ + # data type: GuildStickerResponse + oneof_schema_1_validator: Optional[GuildStickerResponse] = None + # data type: StandardStickerResponse + oneof_schema_2_validator: Optional[StandardStickerResponse] = None + actual_instance: Optional[Union[GuildStickerResponse, StandardStickerResponse]] = None + one_of_schemas: Set[str] = { "GuildStickerResponse", "StandardStickerResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GetSticker200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: GuildStickerResponse + if not isinstance(v, GuildStickerResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildStickerResponse`") + else: + match += 1 + # validate data type: StandardStickerResponse + if not isinstance(v, StandardStickerResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `StandardStickerResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into GuildStickerResponse + try: + instance.actual_instance = GuildStickerResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StandardStickerResponse + try: + instance.actual_instance = StandardStickerResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GetSticker200Response with oneOf schemas: GuildStickerResponse, StandardStickerResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], GuildStickerResponse, StandardStickerResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/github_author.py b/dc_rest/models/github_author.py new file mode 100644 index 0000000..584f297 --- /dev/null +++ b/dc_rest/models/github_author.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GithubAuthor(BaseModel): + """ + GithubAuthor + """ # noqa: E501 + username: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + name: Annotated[str, Field(strict=True, max_length=152133)] + __properties: ClassVar[List[str]] = ["username", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubAuthor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubAuthor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubAuthor) in the input: " + _key) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/github_check_app.py b/dc_rest/models/github_check_app.py new file mode 100644 index 0000000..2fc7188 --- /dev/null +++ b/dc_rest/models/github_check_app.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GithubCheckApp(BaseModel): + """ + GithubCheckApp + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=152133)] + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCheckApp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCheckApp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCheckApp) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/github_check_pull_request.py b/dc_rest/models/github_check_pull_request.py new file mode 100644 index 0000000..7f7af33 --- /dev/null +++ b/dc_rest/models/github_check_pull_request.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GithubCheckPullRequest(BaseModel): + """ + GithubCheckPullRequest + """ # noqa: E501 + number: StrictInt + __properties: ClassVar[List[str]] = ["number"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCheckPullRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCheckPullRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCheckPullRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "number": obj.get("number") + }) + return _obj + + diff --git a/dc_rest/models/github_check_run.py b/dc_rest/models/github_check_run.py new file mode 100644 index 0000000..396deb1 --- /dev/null +++ b/dc_rest/models/github_check_run.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest +from dc_rest.models.github_check_run_output import GithubCheckRunOutput +from dc_rest.models.github_check_suite import GithubCheckSuite +from typing import Optional, Set +from typing_extensions import Self + +class GithubCheckRun(BaseModel): + """ + GithubCheckRun + """ # noqa: E501 + conclusion: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + name: Annotated[str, Field(strict=True, max_length=152133)] + html_url: Annotated[str, Field(strict=True, max_length=2048)] + check_suite: GithubCheckSuite + details_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + output: Optional[GithubCheckRunOutput] = None + pull_requests: Optional[Annotated[List[GithubCheckPullRequest], Field(max_length=1521)]] = None + __properties: ClassVar[List[str]] = ["conclusion", "name", "html_url", "check_suite", "details_url", "output", "pull_requests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCheckRun from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of check_suite + if self.check_suite: + _dict['check_suite'] = self.check_suite.to_dict() + # override the default output from pydantic by calling `to_dict()` of output + if self.output: + _dict['output'] = self.output.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in pull_requests (list) + _items = [] + if self.pull_requests: + for _item_pull_requests in self.pull_requests: + if _item_pull_requests: + _items.append(_item_pull_requests.to_dict()) + _dict['pull_requests'] = _items + # set to None if conclusion (nullable) is None + # and model_fields_set contains the field + if self.conclusion is None and "conclusion" in self.model_fields_set: + _dict['conclusion'] = None + + # set to None if details_url (nullable) is None + # and model_fields_set contains the field + if self.details_url is None and "details_url" in self.model_fields_set: + _dict['details_url'] = None + + # set to None if output (nullable) is None + # and model_fields_set contains the field + if self.output is None and "output" in self.model_fields_set: + _dict['output'] = None + + # set to None if pull_requests (nullable) is None + # and model_fields_set contains the field + if self.pull_requests is None and "pull_requests" in self.model_fields_set: + _dict['pull_requests'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCheckRun from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCheckRun) in the input: " + _key) + + _obj = cls.model_validate({ + "conclusion": obj.get("conclusion"), + "name": obj.get("name"), + "html_url": obj.get("html_url"), + "check_suite": GithubCheckSuite.from_dict(obj["check_suite"]) if obj.get("check_suite") is not None else None, + "details_url": obj.get("details_url"), + "output": GithubCheckRunOutput.from_dict(obj["output"]) if obj.get("output") is not None else None, + "pull_requests": [GithubCheckPullRequest.from_dict(_item) for _item in obj["pull_requests"]] if obj.get("pull_requests") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/github_check_run_output.py b/dc_rest/models/github_check_run_output.py new file mode 100644 index 0000000..fe751db --- /dev/null +++ b/dc_rest/models/github_check_run_output.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GithubCheckRunOutput(BaseModel): + """ + GithubCheckRunOutput + """ # noqa: E501 + title: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + summary: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + __properties: ClassVar[List[str]] = ["title", "summary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCheckRunOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if summary (nullable) is None + # and model_fields_set contains the field + if self.summary is None and "summary" in self.model_fields_set: + _dict['summary'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCheckRunOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCheckRunOutput) in the input: " + _key) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "summary": obj.get("summary") + }) + return _obj + + diff --git a/dc_rest/models/github_check_suite.py b/dc_rest/models/github_check_suite.py new file mode 100644 index 0000000..29b601f --- /dev/null +++ b/dc_rest/models/github_check_suite.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_check_app import GithubCheckApp +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest +from typing import Optional, Set +from typing_extensions import Self + +class GithubCheckSuite(BaseModel): + """ + GithubCheckSuite + """ # noqa: E501 + conclusion: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + head_branch: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + head_sha: Annotated[str, Field(strict=True, max_length=152133)] + pull_requests: Optional[Annotated[List[GithubCheckPullRequest], Field(max_length=1521)]] = None + app: GithubCheckApp + __properties: ClassVar[List[str]] = ["conclusion", "head_branch", "head_sha", "pull_requests", "app"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCheckSuite from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in pull_requests (list) + _items = [] + if self.pull_requests: + for _item_pull_requests in self.pull_requests: + if _item_pull_requests: + _items.append(_item_pull_requests.to_dict()) + _dict['pull_requests'] = _items + # override the default output from pydantic by calling `to_dict()` of app + if self.app: + _dict['app'] = self.app.to_dict() + # set to None if conclusion (nullable) is None + # and model_fields_set contains the field + if self.conclusion is None and "conclusion" in self.model_fields_set: + _dict['conclusion'] = None + + # set to None if head_branch (nullable) is None + # and model_fields_set contains the field + if self.head_branch is None and "head_branch" in self.model_fields_set: + _dict['head_branch'] = None + + # set to None if pull_requests (nullable) is None + # and model_fields_set contains the field + if self.pull_requests is None and "pull_requests" in self.model_fields_set: + _dict['pull_requests'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCheckSuite from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCheckSuite) in the input: " + _key) + + _obj = cls.model_validate({ + "conclusion": obj.get("conclusion"), + "head_branch": obj.get("head_branch"), + "head_sha": obj.get("head_sha"), + "pull_requests": [GithubCheckPullRequest.from_dict(_item) for _item in obj["pull_requests"]] if obj.get("pull_requests") is not None else None, + "app": GithubCheckApp.from_dict(obj["app"]) if obj.get("app") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/github_comment.py b/dc_rest/models/github_comment.py new file mode 100644 index 0000000..7cd5d9f --- /dev/null +++ b/dc_rest/models/github_comment.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubComment(BaseModel): + """ + GithubComment + """ # noqa: E501 + id: StrictInt + html_url: Annotated[str, Field(strict=True, max_length=2048)] + user: GithubUser + commit_id: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + body: Annotated[str, Field(strict=True, max_length=152133)] + __properties: ClassVar[List[str]] = ["id", "html_url", "user", "commit_id", "body"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubComment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if commit_id (nullable) is None + # and model_fields_set contains the field + if self.commit_id is None and "commit_id" in self.model_fields_set: + _dict['commit_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubComment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubComment) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "html_url": obj.get("html_url"), + "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "commit_id": obj.get("commit_id"), + "body": obj.get("body") + }) + return _obj + + diff --git a/dc_rest/models/github_commit.py b/dc_rest/models/github_commit.py new file mode 100644 index 0000000..2e9352c --- /dev/null +++ b/dc_rest/models/github_commit.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.github_author import GithubAuthor +from typing import Optional, Set +from typing_extensions import Self + +class GithubCommit(BaseModel): + """ + GithubCommit + """ # noqa: E501 + id: Annotated[str, Field(strict=True, max_length=152133)] + url: Annotated[str, Field(strict=True, max_length=2048)] + message: Annotated[str, Field(strict=True, max_length=152133)] + author: GithubAuthor + __properties: ClassVar[List[str]] = ["id", "url", "message", "author"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubCommit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubCommit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubCommit) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url"), + "message": obj.get("message"), + "author": GithubAuthor.from_dict(obj["author"]) if obj.get("author") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/github_discussion.py b/dc_rest/models/github_discussion.py new file mode 100644 index 0000000..a9dc9d7 --- /dev/null +++ b/dc_rest/models/github_discussion.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubDiscussion(BaseModel): + """ + GithubDiscussion + """ # noqa: E501 + title: Annotated[str, Field(strict=True, max_length=152133)] + number: StrictInt + html_url: Annotated[str, Field(strict=True, max_length=2048)] + answer_html_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + user: GithubUser + __properties: ClassVar[List[str]] = ["title", "number", "html_url", "answer_html_url", "body", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubDiscussion from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if answer_html_url (nullable) is None + # and model_fields_set contains the field + if self.answer_html_url is None and "answer_html_url" in self.model_fields_set: + _dict['answer_html_url'] = None + + # set to None if body (nullable) is None + # and model_fields_set contains the field + if self.body is None and "body" in self.model_fields_set: + _dict['body'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubDiscussion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubDiscussion) in the input: " + _key) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "number": obj.get("number"), + "html_url": obj.get("html_url"), + "answer_html_url": obj.get("answer_html_url"), + "body": obj.get("body"), + "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/github_issue.py b/dc_rest/models/github_issue.py new file mode 100644 index 0000000..f3d8112 --- /dev/null +++ b/dc_rest/models/github_issue.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubIssue(BaseModel): + """ + GithubIssue + """ # noqa: E501 + id: StrictInt + number: StrictInt + html_url: Annotated[str, Field(strict=True, max_length=2048)] + user: GithubUser + title: Annotated[str, Field(strict=True, max_length=152133)] + body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + pull_request: Optional[Any] = None + __properties: ClassVar[List[str]] = ["id", "number", "html_url", "user", "title", "body", "pull_request"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubIssue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if body (nullable) is None + # and model_fields_set contains the field + if self.body is None and "body" in self.model_fields_set: + _dict['body'] = None + + # set to None if pull_request (nullable) is None + # and model_fields_set contains the field + if self.pull_request is None and "pull_request" in self.model_fields_set: + _dict['pull_request'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubIssue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubIssue) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "number": obj.get("number"), + "html_url": obj.get("html_url"), + "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "title": obj.get("title"), + "body": obj.get("body"), + "pull_request": obj.get("pull_request") + }) + return _obj + + diff --git a/dc_rest/models/github_release.py b/dc_rest/models/github_release.py new file mode 100644 index 0000000..1db8063 --- /dev/null +++ b/dc_rest/models/github_release.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubRelease(BaseModel): + """ + GithubRelease + """ # noqa: E501 + id: StrictInt + tag_name: Annotated[str, Field(strict=True, max_length=152133)] + html_url: Annotated[str, Field(strict=True, max_length=2048)] + author: GithubUser + __properties: ClassVar[List[str]] = ["id", "tag_name", "html_url", "author"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubRelease from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubRelease from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubRelease) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "tag_name": obj.get("tag_name"), + "html_url": obj.get("html_url"), + "author": GithubUser.from_dict(obj["author"]) if obj.get("author") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/github_repository.py b/dc_rest/models/github_repository.py new file mode 100644 index 0000000..740277a --- /dev/null +++ b/dc_rest/models/github_repository.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GithubRepository(BaseModel): + """ + GithubRepository + """ # noqa: E501 + id: StrictInt + html_url: Annotated[str, Field(strict=True, max_length=2048)] + name: Annotated[str, Field(strict=True, max_length=152133)] + full_name: Annotated[str, Field(strict=True, max_length=152133)] + __properties: ClassVar[List[str]] = ["id", "html_url", "name", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubRepository from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubRepository from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubRepository) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "html_url": obj.get("html_url"), + "name": obj.get("name"), + "full_name": obj.get("full_name") + }) + return _obj + + diff --git a/dc_rest/models/github_review.py b/dc_rest/models/github_review.py new file mode 100644 index 0000000..047cd1f --- /dev/null +++ b/dc_rest/models/github_review.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubReview(BaseModel): + """ + GithubReview + """ # noqa: E501 + user: GithubUser + body: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + html_url: Annotated[str, Field(strict=True, max_length=2048)] + state: Annotated[str, Field(strict=True, max_length=152133)] + __properties: ClassVar[List[str]] = ["user", "body", "html_url", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubReview from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if body (nullable) is None + # and model_fields_set contains the field + if self.body is None and "body" in self.model_fields_set: + _dict['body'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubReview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubReview) in the input: " + _key) + + _obj = cls.model_validate({ + "user": GithubUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "body": obj.get("body"), + "html_url": obj.get("html_url"), + "state": obj.get("state") + }) + return _obj + + diff --git a/dc_rest/models/github_user.py b/dc_rest/models/github_user.py new file mode 100644 index 0000000..50560cd --- /dev/null +++ b/dc_rest/models/github_user.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GithubUser(BaseModel): + """ + GithubUser + """ # noqa: E501 + id: StrictInt + login: Annotated[str, Field(strict=True, max_length=152133)] + html_url: Annotated[str, Field(strict=True, max_length=2048)] + avatar_url: Annotated[str, Field(strict=True, max_length=2048)] + __properties: ClassVar[List[str]] = ["id", "login", "html_url", "avatar_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubUser) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "login": obj.get("login"), + "html_url": obj.get("html_url"), + "avatar_url": obj.get("avatar_url") + }) + return _obj + + diff --git a/dc_rest/models/github_webhook.py b/dc_rest/models/github_webhook.py new file mode 100644 index 0000000..9cc149a --- /dev/null +++ b/dc_rest/models/github_webhook.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.github_check_run import GithubCheckRun +from dc_rest.models.github_check_suite import GithubCheckSuite +from dc_rest.models.github_comment import GithubComment +from dc_rest.models.github_commit import GithubCommit +from dc_rest.models.github_discussion import GithubDiscussion +from dc_rest.models.github_issue import GithubIssue +from dc_rest.models.github_release import GithubRelease +from dc_rest.models.github_repository import GithubRepository +from dc_rest.models.github_review import GithubReview +from dc_rest.models.github_user import GithubUser +from typing import Optional, Set +from typing_extensions import Self + +class GithubWebhook(BaseModel): + """ + GithubWebhook + """ # noqa: E501 + action: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + ref: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + ref_type: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + comment: Optional[GithubComment] = None + issue: Optional[GithubIssue] = None + pull_request: Optional[GithubIssue] = None + repository: Optional[GithubRepository] = None + forkee: Optional[GithubRepository] = None + sender: GithubUser + member: Optional[GithubUser] = None + release: Optional[GithubRelease] = None + head_commit: Optional[GithubCommit] = None + commits: Optional[Annotated[List[GithubCommit], Field(max_length=1521)]] = None + forced: Optional[StrictBool] = None + compare: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + review: Optional[GithubReview] = None + check_run: Optional[GithubCheckRun] = None + check_suite: Optional[GithubCheckSuite] = None + discussion: Optional[GithubDiscussion] = None + answer: Optional[GithubComment] = None + __properties: ClassVar[List[str]] = ["action", "ref", "ref_type", "comment", "issue", "pull_request", "repository", "forkee", "sender", "member", "release", "head_commit", "commits", "forced", "compare", "review", "check_run", "check_suite", "discussion", "answer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of comment + if self.comment: + _dict['comment'] = self.comment.to_dict() + # override the default output from pydantic by calling `to_dict()` of issue + if self.issue: + _dict['issue'] = self.issue.to_dict() + # override the default output from pydantic by calling `to_dict()` of pull_request + if self.pull_request: + _dict['pull_request'] = self.pull_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of repository + if self.repository: + _dict['repository'] = self.repository.to_dict() + # override the default output from pydantic by calling `to_dict()` of forkee + if self.forkee: + _dict['forkee'] = self.forkee.to_dict() + # override the default output from pydantic by calling `to_dict()` of sender + if self.sender: + _dict['sender'] = self.sender.to_dict() + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # override the default output from pydantic by calling `to_dict()` of release + if self.release: + _dict['release'] = self.release.to_dict() + # override the default output from pydantic by calling `to_dict()` of head_commit + if self.head_commit: + _dict['head_commit'] = self.head_commit.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in commits (list) + _items = [] + if self.commits: + for _item_commits in self.commits: + if _item_commits: + _items.append(_item_commits.to_dict()) + _dict['commits'] = _items + # override the default output from pydantic by calling `to_dict()` of review + if self.review: + _dict['review'] = self.review.to_dict() + # override the default output from pydantic by calling `to_dict()` of check_run + if self.check_run: + _dict['check_run'] = self.check_run.to_dict() + # override the default output from pydantic by calling `to_dict()` of check_suite + if self.check_suite: + _dict['check_suite'] = self.check_suite.to_dict() + # override the default output from pydantic by calling `to_dict()` of discussion + if self.discussion: + _dict['discussion'] = self.discussion.to_dict() + # override the default output from pydantic by calling `to_dict()` of answer + if self.answer: + _dict['answer'] = self.answer.to_dict() + # set to None if action (nullable) is None + # and model_fields_set contains the field + if self.action is None and "action" in self.model_fields_set: + _dict['action'] = None + + # set to None if ref (nullable) is None + # and model_fields_set contains the field + if self.ref is None and "ref" in self.model_fields_set: + _dict['ref'] = None + + # set to None if ref_type (nullable) is None + # and model_fields_set contains the field + if self.ref_type is None and "ref_type" in self.model_fields_set: + _dict['ref_type'] = None + + # set to None if comment (nullable) is None + # and model_fields_set contains the field + if self.comment is None and "comment" in self.model_fields_set: + _dict['comment'] = None + + # set to None if issue (nullable) is None + # and model_fields_set contains the field + if self.issue is None and "issue" in self.model_fields_set: + _dict['issue'] = None + + # set to None if pull_request (nullable) is None + # and model_fields_set contains the field + if self.pull_request is None and "pull_request" in self.model_fields_set: + _dict['pull_request'] = None + + # set to None if repository (nullable) is None + # and model_fields_set contains the field + if self.repository is None and "repository" in self.model_fields_set: + _dict['repository'] = None + + # set to None if forkee (nullable) is None + # and model_fields_set contains the field + if self.forkee is None and "forkee" in self.model_fields_set: + _dict['forkee'] = None + + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + # set to None if release (nullable) is None + # and model_fields_set contains the field + if self.release is None and "release" in self.model_fields_set: + _dict['release'] = None + + # set to None if head_commit (nullable) is None + # and model_fields_set contains the field + if self.head_commit is None and "head_commit" in self.model_fields_set: + _dict['head_commit'] = None + + # set to None if commits (nullable) is None + # and model_fields_set contains the field + if self.commits is None and "commits" in self.model_fields_set: + _dict['commits'] = None + + # set to None if forced (nullable) is None + # and model_fields_set contains the field + if self.forced is None and "forced" in self.model_fields_set: + _dict['forced'] = None + + # set to None if compare (nullable) is None + # and model_fields_set contains the field + if self.compare is None and "compare" in self.model_fields_set: + _dict['compare'] = None + + # set to None if review (nullable) is None + # and model_fields_set contains the field + if self.review is None and "review" in self.model_fields_set: + _dict['review'] = None + + # set to None if check_run (nullable) is None + # and model_fields_set contains the field + if self.check_run is None and "check_run" in self.model_fields_set: + _dict['check_run'] = None + + # set to None if check_suite (nullable) is None + # and model_fields_set contains the field + if self.check_suite is None and "check_suite" in self.model_fields_set: + _dict['check_suite'] = None + + # set to None if discussion (nullable) is None + # and model_fields_set contains the field + if self.discussion is None and "discussion" in self.model_fields_set: + _dict['discussion'] = None + + # set to None if answer (nullable) is None + # and model_fields_set contains the field + if self.answer is None and "answer" in self.model_fields_set: + _dict['answer'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GithubWebhook) in the input: " + _key) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "ref": obj.get("ref"), + "ref_type": obj.get("ref_type"), + "comment": GithubComment.from_dict(obj["comment"]) if obj.get("comment") is not None else None, + "issue": GithubIssue.from_dict(obj["issue"]) if obj.get("issue") is not None else None, + "pull_request": GithubIssue.from_dict(obj["pull_request"]) if obj.get("pull_request") is not None else None, + "repository": GithubRepository.from_dict(obj["repository"]) if obj.get("repository") is not None else None, + "forkee": GithubRepository.from_dict(obj["forkee"]) if obj.get("forkee") is not None else None, + "sender": GithubUser.from_dict(obj["sender"]) if obj.get("sender") is not None else None, + "member": GithubUser.from_dict(obj["member"]) if obj.get("member") is not None else None, + "release": GithubRelease.from_dict(obj["release"]) if obj.get("release") is not None else None, + "head_commit": GithubCommit.from_dict(obj["head_commit"]) if obj.get("head_commit") is not None else None, + "commits": [GithubCommit.from_dict(_item) for _item in obj["commits"]] if obj.get("commits") is not None else None, + "forced": obj.get("forced"), + "compare": obj.get("compare"), + "review": GithubReview.from_dict(obj["review"]) if obj.get("review") is not None else None, + "check_run": GithubCheckRun.from_dict(obj["check_run"]) if obj.get("check_run") is not None else None, + "check_suite": GithubCheckSuite.from_dict(obj["check_suite"]) if obj.get("check_suite") is not None else None, + "discussion": GithubDiscussion.from_dict(obj["discussion"]) if obj.get("discussion") is not None else None, + "answer": GithubComment.from_dict(obj["answer"]) if obj.get("answer") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/group_dm_invite_response.py b/dc_rest/models/group_dm_invite_response.py new file mode 100644 index 0000000..b4826f5 --- /dev/null +++ b/dc_rest/models/group_dm_invite_response.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.invite_channel_response import InviteChannelResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GroupDMInviteResponse(BaseModel): + """ + GroupDMInviteResponse + """ # noqa: E501 + type: Optional[StrictInt] = None + code: StrictStr + inviter: Optional[UserResponse] = None + max_age: Optional[StrictInt] = None + created_at: Optional[datetime] = None + expires_at: Optional[datetime] = None + channel: Optional[InviteChannelResponse] = None + approximate_member_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "channel", "approximate_member_count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupDMInviteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inviter + if self.inviter: + _dict['inviter'] = self.inviter.to_dict() + # override the default output from pydantic by calling `to_dict()` of channel + if self.channel: + _dict['channel'] = self.channel.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if inviter (nullable) is None + # and model_fields_set contains the field + if self.inviter is None and "inviter" in self.model_fields_set: + _dict['inviter'] = None + + # set to None if max_age (nullable) is None + # and model_fields_set contains the field + if self.max_age is None and "max_age" in self.model_fields_set: + _dict['max_age'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if channel (nullable) is None + # and model_fields_set contains the field + if self.channel is None and "channel" in self.model_fields_set: + _dict['channel'] = None + + # set to None if approximate_member_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set: + _dict['approximate_member_count'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupDMInviteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GroupDMInviteResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "code": obj.get("code"), + "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None, + "max_age": obj.get("max_age"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None, + "approximate_member_count": obj.get("approximate_member_count") + }) + return _obj + + diff --git a/dc_rest/models/guild_audit_log_response.py b/dc_rest/models/guild_audit_log_response.py new file mode 100644 index 0000000..645a506 --- /dev/null +++ b/dc_rest/models/guild_audit_log_response.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse +from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildAuditLogResponse(BaseModel): + """ + GuildAuditLogResponse + """ # noqa: E501 + audit_log_entries: List[AuditLogEntryResponse] + users: List[UserResponse] + integrations: List[GuildAuditLogResponseIntegrationsInner] + webhooks: List[ListChannelWebhooks200ResponseInner] + guild_scheduled_events: List[ListGuildScheduledEvents200ResponseInner] + threads: List[ThreadResponse] + application_commands: List[ApplicationCommandResponse] + auto_moderation_rules: List[Optional[ListAutoModerationRules200ResponseInner]] + __properties: ClassVar[List[str]] = ["audit_log_entries", "users", "integrations", "webhooks", "guild_scheduled_events", "threads", "application_commands", "auto_moderation_rules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildAuditLogResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in audit_log_entries (list) + _items = [] + if self.audit_log_entries: + for _item_audit_log_entries in self.audit_log_entries: + if _item_audit_log_entries: + _items.append(_item_audit_log_entries.to_dict()) + _dict['audit_log_entries'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in integrations (list) + _items = [] + if self.integrations: + for _item_integrations in self.integrations: + if _item_integrations: + _items.append(_item_integrations.to_dict()) + _dict['integrations'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in webhooks (list) + _items = [] + if self.webhooks: + for _item_webhooks in self.webhooks: + if _item_webhooks: + _items.append(_item_webhooks.to_dict()) + _dict['webhooks'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in guild_scheduled_events (list) + _items = [] + if self.guild_scheduled_events: + for _item_guild_scheduled_events in self.guild_scheduled_events: + if _item_guild_scheduled_events: + _items.append(_item_guild_scheduled_events.to_dict()) + _dict['guild_scheduled_events'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in threads (list) + _items = [] + if self.threads: + for _item_threads in self.threads: + if _item_threads: + _items.append(_item_threads.to_dict()) + _dict['threads'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in application_commands (list) + _items = [] + if self.application_commands: + for _item_application_commands in self.application_commands: + if _item_application_commands: + _items.append(_item_application_commands.to_dict()) + _dict['application_commands'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in auto_moderation_rules (list) + _items = [] + if self.auto_moderation_rules: + for _item_auto_moderation_rules in self.auto_moderation_rules: + if _item_auto_moderation_rules: + _items.append(_item_auto_moderation_rules.to_dict()) + _dict['auto_moderation_rules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildAuditLogResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildAuditLogResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "audit_log_entries": [AuditLogEntryResponse.from_dict(_item) for _item in obj["audit_log_entries"]] if obj.get("audit_log_entries") is not None else None, + "users": [UserResponse.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "integrations": [GuildAuditLogResponseIntegrationsInner.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None, + "webhooks": [ListChannelWebhooks200ResponseInner.from_dict(_item) for _item in obj["webhooks"]] if obj.get("webhooks") is not None else None, + "guild_scheduled_events": [ListGuildScheduledEvents200ResponseInner.from_dict(_item) for _item in obj["guild_scheduled_events"]] if obj.get("guild_scheduled_events") is not None else None, + "threads": [ThreadResponse.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None, + "application_commands": [ApplicationCommandResponse.from_dict(_item) for _item in obj["application_commands"]] if obj.get("application_commands") is not None else None, + "auto_moderation_rules": [ListAutoModerationRules200ResponseInner.from_dict(_item) for _item in obj["auto_moderation_rules"]] if obj.get("auto_moderation_rules") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_audit_log_response_integrations_inner.py b/dc_rest/models/guild_audit_log_response_integrations_inner.py new file mode 100644 index 0000000..34919d2 --- /dev/null +++ b/dc_rest/models/guild_audit_log_response_integrations_inner.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse +from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse +from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GUILDAUDITLOGRESPONSEINTEGRATIONSINNER_ONE_OF_SCHEMAS = ["PartialDiscordIntegrationResponse", "PartialExternalConnectionIntegrationResponse", "PartialGuildSubscriptionIntegrationResponse"] + +class GuildAuditLogResponseIntegrationsInner(BaseModel): + """ + GuildAuditLogResponseIntegrationsInner + """ + # data type: PartialDiscordIntegrationResponse + oneof_schema_1_validator: Optional[PartialDiscordIntegrationResponse] = None + # data type: PartialExternalConnectionIntegrationResponse + oneof_schema_2_validator: Optional[PartialExternalConnectionIntegrationResponse] = None + # data type: PartialGuildSubscriptionIntegrationResponse + oneof_schema_3_validator: Optional[PartialGuildSubscriptionIntegrationResponse] = None + actual_instance: Optional[Union[PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse]] = None + one_of_schemas: Set[str] = { "PartialDiscordIntegrationResponse", "PartialExternalConnectionIntegrationResponse", "PartialGuildSubscriptionIntegrationResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GuildAuditLogResponseIntegrationsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: PartialDiscordIntegrationResponse + if not isinstance(v, PartialDiscordIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PartialDiscordIntegrationResponse`") + else: + match += 1 + # validate data type: PartialExternalConnectionIntegrationResponse + if not isinstance(v, PartialExternalConnectionIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PartialExternalConnectionIntegrationResponse`") + else: + match += 1 + # validate data type: PartialGuildSubscriptionIntegrationResponse + if not isinstance(v, PartialGuildSubscriptionIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PartialGuildSubscriptionIntegrationResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into PartialDiscordIntegrationResponse + try: + instance.actual_instance = PartialDiscordIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PartialExternalConnectionIntegrationResponse + try: + instance.actual_instance = PartialExternalConnectionIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PartialGuildSubscriptionIntegrationResponse + try: + instance.actual_instance = PartialGuildSubscriptionIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GuildAuditLogResponseIntegrationsInner with oneOf schemas: PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], PartialDiscordIntegrationResponse, PartialExternalConnectionIntegrationResponse, PartialGuildSubscriptionIntegrationResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/guild_ban_response.py b/dc_rest/models/guild_ban_response.py new file mode 100644 index 0000000..9525eb5 --- /dev/null +++ b/dc_rest/models/guild_ban_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildBanResponse(BaseModel): + """ + GuildBanResponse + """ # noqa: E501 + user: UserResponse + reason: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["user", "reason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildBanResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildBanResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildBanResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "reason": obj.get("reason") + }) + return _obj + + diff --git a/dc_rest/models/guild_channel_location.py b/dc_rest/models/guild_channel_location.py new file mode 100644 index 0000000..7d43d1b --- /dev/null +++ b/dc_rest/models/guild_channel_location.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildChannelLocation(BaseModel): + """ + GuildChannelLocation + """ # noqa: E501 + id: StrictStr + kind: StrictStr + channel_id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "kind", "channel_id", "guild_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildChannelLocation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildChannelLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildChannelLocation) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "kind": obj.get("kind"), + "channel_id": obj.get("channel_id"), + "guild_id": obj.get("guild_id") + }) + return _obj + + diff --git a/dc_rest/models/guild_channel_response.py b/dc_rest/models/guild_channel_response.py new file mode 100644 index 0000000..ace8ce5 --- /dev/null +++ b/dc_rest/models/guild_channel_response.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse +from dc_rest.models.forum_tag_response import ForumTagResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildChannelResponse(BaseModel): + """ + GuildChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + last_message_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: StrictInt + last_pin_timestamp: Optional[datetime] = None + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + rate_limit_per_user: Optional[StrictInt] = None + bitrate: Optional[StrictInt] = None + user_limit: Optional[StrictInt] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + permissions: Optional[StrictStr] = None + topic: Optional[StrictStr] = None + default_auto_archive_duration: Optional[StrictInt] = None + default_thread_rate_limit_per_user: Optional[StrictInt] = None + position: StrictInt + permission_overwrites: Optional[List[ChannelPermissionOverwriteResponse]] = None + nsfw: Optional[StrictBool] = None + available_tags: Optional[List[ForumTagResponse]] = None + default_reaction_emoji: Optional[DefaultReactionEmojiResponse] = None + default_sort_order: Optional[StrictInt] = None + default_forum_layout: Optional[StrictInt] = None + default_tag_setting: Optional[StrictStr] = None + hd_streaming_until: Optional[datetime] = None + hd_streaming_buyer_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "guild_id", "name", "parent_id", "rate_limit_per_user", "bitrate", "user_limit", "rtc_region", "video_quality_mode", "permissions", "topic", "default_auto_archive_duration", "default_thread_rate_limit_per_user", "position", "permission_overwrites", "nsfw", "available_tags", "default_reaction_emoji", "default_sort_order", "default_forum_layout", "default_tag_setting", "hd_streaming_until", "hd_streaming_buyer_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('last_message_id') + def last_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('hd_streaming_buyer_id') + def hd_streaming_buyer_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list) + _items = [] + if self.permission_overwrites: + for _item_permission_overwrites in self.permission_overwrites: + if _item_permission_overwrites: + _items.append(_item_permission_overwrites.to_dict()) + _dict['permission_overwrites'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list) + _items = [] + if self.available_tags: + for _item_available_tags in self.available_tags: + if _item_available_tags: + _items.append(_item_available_tags.to_dict()) + _dict['available_tags'] = _items + # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji + if self.default_reaction_emoji: + _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict() + # set to None if last_pin_timestamp (nullable) is None + # and model_fields_set contains the field + if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set: + _dict['last_pin_timestamp'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + # set to None if topic (nullable) is None + # and model_fields_set contains the field + if self.topic is None and "topic" in self.model_fields_set: + _dict['topic'] = None + + # set to None if default_thread_rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set: + _dict['default_thread_rate_limit_per_user'] = None + + # set to None if permission_overwrites (nullable) is None + # and model_fields_set contains the field + if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set: + _dict['permission_overwrites'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + # set to None if available_tags (nullable) is None + # and model_fields_set contains the field + if self.available_tags is None and "available_tags" in self.model_fields_set: + _dict['available_tags'] = None + + # set to None if default_reaction_emoji (nullable) is None + # and model_fields_set contains the field + if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set: + _dict['default_reaction_emoji'] = None + + # set to None if hd_streaming_until (nullable) is None + # and model_fields_set contains the field + if self.hd_streaming_until is None and "hd_streaming_until" in self.model_fields_set: + _dict['hd_streaming_until'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "last_message_id": obj.get("last_message_id"), + "flags": obj.get("flags"), + "last_pin_timestamp": obj.get("last_pin_timestamp"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "permissions": obj.get("permissions"), + "topic": obj.get("topic"), + "default_auto_archive_duration": obj.get("default_auto_archive_duration"), + "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"), + "position": obj.get("position"), + "permission_overwrites": [ChannelPermissionOverwriteResponse.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None, + "nsfw": obj.get("nsfw"), + "available_tags": [ForumTagResponse.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None, + "default_reaction_emoji": DefaultReactionEmojiResponse.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None, + "default_sort_order": obj.get("default_sort_order"), + "default_forum_layout": obj.get("default_forum_layout"), + "default_tag_setting": obj.get("default_tag_setting"), + "hd_streaming_until": obj.get("hd_streaming_until"), + "hd_streaming_buyer_id": obj.get("hd_streaming_buyer_id") + }) + return _obj + + diff --git a/dc_rest/models/guild_create_request.py b/dc_rest/models/guild_create_request.py new file mode 100644 index 0000000..4963582 --- /dev/null +++ b/dc_rest/models/guild_create_request.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem +from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem +from typing import Optional, Set +from typing_extensions import Self + +class GuildCreateRequest(BaseModel): + """ + GuildCreateRequest + """ # noqa: E501 + description: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=300)]] = None + name: Annotated[str, Field(min_length=2, strict=True, max_length=100)] + region: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + verification_level: Optional[StrictInt] = None + default_message_notifications: Optional[StrictInt] = None + explicit_content_filter: Optional[StrictInt] = None + preferred_locale: Optional[StrictStr] = None + afk_timeout: Optional[StrictInt] = None + roles: Optional[Annotated[List[CreateGuildRequestRoleItem], Field(max_length=1521)]] = None + channels: Optional[Annotated[List[CreateGuildRequestChannelItem], Field(max_length=1521)]] = None + afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["description", "name", "region", "icon", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_timeout", "roles", "channels", "afk_channel_id", "system_channel_id", "system_channel_flags"] + + @field_validator('afk_channel_id') + def afk_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('system_channel_id') + def system_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item_roles in self.roles: + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in channels (list) + _items = [] + if self.channels: + for _item_channels in self.channels: + if _item_channels: + _items.append(_item_channels.to_dict()) + _dict['channels'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict['region'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if afk_timeout (nullable) is None + # and model_fields_set contains the field + if self.afk_timeout is None and "afk_timeout" in self.model_fields_set: + _dict['afk_timeout'] = None + + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + # set to None if channels (nullable) is None + # and model_fields_set contains the field + if self.channels is None and "channels" in self.model_fields_set: + _dict['channels'] = None + + # set to None if system_channel_flags (nullable) is None + # and model_fields_set contains the field + if self.system_channel_flags is None and "system_channel_flags" in self.model_fields_set: + _dict['system_channel_flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "name": obj.get("name"), + "region": obj.get("region"), + "icon": obj.get("icon"), + "verification_level": obj.get("verification_level"), + "default_message_notifications": obj.get("default_message_notifications"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "preferred_locale": obj.get("preferred_locale"), + "afk_timeout": obj.get("afk_timeout"), + "roles": [CreateGuildRequestRoleItem.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "channels": [CreateGuildRequestChannelItem.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") is not None else None, + "afk_channel_id": obj.get("afk_channel_id"), + "system_channel_id": obj.get("system_channel_id"), + "system_channel_flags": obj.get("system_channel_flags") + }) + return _obj + + diff --git a/dc_rest/models/guild_home_settings_response.py b/dc_rest/models/guild_home_settings_response.py new file mode 100644 index 0000000..ea77c27 --- /dev/null +++ b/dc_rest/models/guild_home_settings_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.new_member_action_response import NewMemberActionResponse +from dc_rest.models.resource_channel_response import ResourceChannelResponse +from dc_rest.models.welcome_message_response import WelcomeMessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildHomeSettingsResponse(BaseModel): + """ + GuildHomeSettingsResponse + """ # noqa: E501 + guild_id: Annotated[str, Field(strict=True)] + enabled: StrictBool + welcome_message: Optional[WelcomeMessageResponse] = None + new_member_actions: Optional[List[Optional[NewMemberActionResponse]]] = None + resource_channels: Optional[List[Optional[ResourceChannelResponse]]] = None + __properties: ClassVar[List[str]] = ["guild_id", "enabled", "welcome_message", "new_member_actions", "resource_channels"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildHomeSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of welcome_message + if self.welcome_message: + _dict['welcome_message'] = self.welcome_message.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in new_member_actions (list) + _items = [] + if self.new_member_actions: + for _item_new_member_actions in self.new_member_actions: + if _item_new_member_actions: + _items.append(_item_new_member_actions.to_dict()) + _dict['new_member_actions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in resource_channels (list) + _items = [] + if self.resource_channels: + for _item_resource_channels in self.resource_channels: + if _item_resource_channels: + _items.append(_item_resource_channels.to_dict()) + _dict['resource_channels'] = _items + # set to None if welcome_message (nullable) is None + # and model_fields_set contains the field + if self.welcome_message is None and "welcome_message" in self.model_fields_set: + _dict['welcome_message'] = None + + # set to None if new_member_actions (nullable) is None + # and model_fields_set contains the field + if self.new_member_actions is None and "new_member_actions" in self.model_fields_set: + _dict['new_member_actions'] = None + + # set to None if resource_channels (nullable) is None + # and model_fields_set contains the field + if self.resource_channels is None and "resource_channels" in self.model_fields_set: + _dict['resource_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildHomeSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildHomeSettingsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_id": obj.get("guild_id"), + "enabled": obj.get("enabled"), + "welcome_message": WelcomeMessageResponse.from_dict(obj["welcome_message"]) if obj.get("welcome_message") is not None else None, + "new_member_actions": [NewMemberActionResponse.from_dict(_item) for _item in obj["new_member_actions"]] if obj.get("new_member_actions") is not None else None, + "resource_channels": [ResourceChannelResponse.from_dict(_item) for _item in obj["resource_channels"]] if obj.get("resource_channels") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_incoming_webhook_response.py b/dc_rest/models/guild_incoming_webhook_response.py new file mode 100644 index 0000000..2d5c982 --- /dev/null +++ b/dc_rest/models/guild_incoming_webhook_response.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildIncomingWebhookResponse(BaseModel): + """ + GuildIncomingWebhookResponse + """ # noqa: E501 + application_id: Optional[Annotated[str, Field(strict=True)]] = None + avatar: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + id: Annotated[str, Field(strict=True)] + name: StrictStr + type: StrictInt + user: Optional[UserResponse] = None + token: Optional[StrictStr] = None + url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["application_id", "avatar", "channel_id", "guild_id", "id", "name", "type", "user", "token", "url"] + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildIncomingWebhookResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildIncomingWebhookResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildIncomingWebhookResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "application_id": obj.get("application_id"), + "avatar": obj.get("avatar"), + "channel_id": obj.get("channel_id"), + "guild_id": obj.get("guild_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "token": obj.get("token"), + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/guild_invite_response.py b/dc_rest/models/guild_invite_response.py new file mode 100644 index 0000000..59adb88 --- /dev/null +++ b/dc_rest/models/guild_invite_response.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.invite_application_response import InviteApplicationResponse +from dc_rest.models.invite_channel_response import InviteChannelResponse +from dc_rest.models.invite_guild_response import InviteGuildResponse +from dc_rest.models.scheduled_event_response import ScheduledEventResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildInviteResponse(BaseModel): + """ + GuildInviteResponse + """ # noqa: E501 + type: Optional[StrictInt] = None + code: StrictStr + inviter: Optional[UserResponse] = None + max_age: Optional[StrictInt] = None + created_at: Optional[datetime] = None + expires_at: Optional[datetime] = None + is_contact: Optional[StrictBool] = None + flags: Optional[StrictInt] = None + guild: Optional[InviteGuildResponse] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + channel: Optional[InviteChannelResponse] = None + target_type: Optional[StrictInt] = None + target_user: Optional[UserResponse] = None + target_application: Optional[InviteApplicationResponse] = None + guild_scheduled_event: Optional[ScheduledEventResponse] = None + uses: Optional[StrictInt] = None + max_uses: Optional[StrictInt] = None + temporary: Optional[StrictBool] = None + approximate_member_count: Optional[StrictInt] = None + approximate_presence_count: Optional[StrictInt] = None + is_nickname_changeable: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "code", "inviter", "max_age", "created_at", "expires_at", "is_contact", "flags", "guild", "guild_id", "channel", "target_type", "target_user", "target_application", "guild_scheduled_event", "uses", "max_uses", "temporary", "approximate_member_count", "approximate_presence_count", "is_nickname_changeable"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildInviteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inviter + if self.inviter: + _dict['inviter'] = self.inviter.to_dict() + # override the default output from pydantic by calling `to_dict()` of guild + if self.guild: + _dict['guild'] = self.guild.to_dict() + # override the default output from pydantic by calling `to_dict()` of channel + if self.channel: + _dict['channel'] = self.channel.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_user + if self.target_user: + _dict['target_user'] = self.target_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_application + if self.target_application: + _dict['target_application'] = self.target_application.to_dict() + # override the default output from pydantic by calling `to_dict()` of guild_scheduled_event + if self.guild_scheduled_event: + _dict['guild_scheduled_event'] = self.guild_scheduled_event.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if inviter (nullable) is None + # and model_fields_set contains the field + if self.inviter is None and "inviter" in self.model_fields_set: + _dict['inviter'] = None + + # set to None if max_age (nullable) is None + # and model_fields_set contains the field + if self.max_age is None and "max_age" in self.model_fields_set: + _dict['max_age'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if is_contact (nullable) is None + # and model_fields_set contains the field + if self.is_contact is None and "is_contact" in self.model_fields_set: + _dict['is_contact'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if guild (nullable) is None + # and model_fields_set contains the field + if self.guild is None and "guild" in self.model_fields_set: + _dict['guild'] = None + + # set to None if channel (nullable) is None + # and model_fields_set contains the field + if self.channel is None and "channel" in self.model_fields_set: + _dict['channel'] = None + + # set to None if target_type (nullable) is None + # and model_fields_set contains the field + if self.target_type is None and "target_type" in self.model_fields_set: + _dict['target_type'] = None + + # set to None if target_user (nullable) is None + # and model_fields_set contains the field + if self.target_user is None and "target_user" in self.model_fields_set: + _dict['target_user'] = None + + # set to None if target_application (nullable) is None + # and model_fields_set contains the field + if self.target_application is None and "target_application" in self.model_fields_set: + _dict['target_application'] = None + + # set to None if guild_scheduled_event (nullable) is None + # and model_fields_set contains the field + if self.guild_scheduled_event is None and "guild_scheduled_event" in self.model_fields_set: + _dict['guild_scheduled_event'] = None + + # set to None if uses (nullable) is None + # and model_fields_set contains the field + if self.uses is None and "uses" in self.model_fields_set: + _dict['uses'] = None + + # set to None if max_uses (nullable) is None + # and model_fields_set contains the field + if self.max_uses is None and "max_uses" in self.model_fields_set: + _dict['max_uses'] = None + + # set to None if temporary (nullable) is None + # and model_fields_set contains the field + if self.temporary is None and "temporary" in self.model_fields_set: + _dict['temporary'] = None + + # set to None if approximate_member_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set: + _dict['approximate_member_count'] = None + + # set to None if approximate_presence_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_presence_count is None and "approximate_presence_count" in self.model_fields_set: + _dict['approximate_presence_count'] = None + + # set to None if is_nickname_changeable (nullable) is None + # and model_fields_set contains the field + if self.is_nickname_changeable is None and "is_nickname_changeable" in self.model_fields_set: + _dict['is_nickname_changeable'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildInviteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildInviteResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "code": obj.get("code"), + "inviter": UserResponse.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None, + "max_age": obj.get("max_age"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "is_contact": obj.get("is_contact"), + "flags": obj.get("flags"), + "guild": InviteGuildResponse.from_dict(obj["guild"]) if obj.get("guild") is not None else None, + "guild_id": obj.get("guild_id"), + "channel": InviteChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None, + "target_type": obj.get("target_type"), + "target_user": UserResponse.from_dict(obj["target_user"]) if obj.get("target_user") is not None else None, + "target_application": InviteApplicationResponse.from_dict(obj["target_application"]) if obj.get("target_application") is not None else None, + "guild_scheduled_event": ScheduledEventResponse.from_dict(obj["guild_scheduled_event"]) if obj.get("guild_scheduled_event") is not None else None, + "uses": obj.get("uses"), + "max_uses": obj.get("max_uses"), + "temporary": obj.get("temporary"), + "approximate_member_count": obj.get("approximate_member_count"), + "approximate_presence_count": obj.get("approximate_presence_count"), + "is_nickname_changeable": obj.get("is_nickname_changeable") + }) + return _obj + + diff --git a/dc_rest/models/guild_member_response.py b/dc_rest/models/guild_member_response.py new file mode 100644 index 0000000..b548288 --- /dev/null +++ b/dc_rest/models/guild_member_response.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildMemberResponse(BaseModel): + """ + GuildMemberResponse + """ # noqa: E501 + avatar: Optional[StrictStr] = None + avatar_decoration_data: Optional[UserAvatarDecorationResponse] = None + banner: Optional[StrictStr] = None + communication_disabled_until: Optional[datetime] = None + flags: StrictInt + joined_at: datetime + nick: Optional[StrictStr] = None + pending: StrictBool + premium_since: Optional[datetime] = None + roles: List[Annotated[str, Field(strict=True)]] + user: UserResponse + mute: StrictBool + deaf: StrictBool + __properties: ClassVar[List[str]] = ["avatar", "avatar_decoration_data", "banner", "communication_disabled_until", "flags", "joined_at", "nick", "pending", "premium_since", "roles", "user", "mute", "deaf"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of avatar_decoration_data + if self.avatar_decoration_data: + _dict['avatar_decoration_data'] = self.avatar_decoration_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if avatar_decoration_data (nullable) is None + # and model_fields_set contains the field + if self.avatar_decoration_data is None and "avatar_decoration_data" in self.model_fields_set: + _dict['avatar_decoration_data'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if communication_disabled_until (nullable) is None + # and model_fields_set contains the field + if self.communication_disabled_until is None and "communication_disabled_until" in self.model_fields_set: + _dict['communication_disabled_until'] = None + + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + # set to None if premium_since (nullable) is None + # and model_fields_set contains the field + if self.premium_since is None and "premium_since" in self.model_fields_set: + _dict['premium_since'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildMemberResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "avatar": obj.get("avatar"), + "avatar_decoration_data": UserAvatarDecorationResponse.from_dict(obj["avatar_decoration_data"]) if obj.get("avatar_decoration_data") is not None else None, + "banner": obj.get("banner"), + "communication_disabled_until": obj.get("communication_disabled_until"), + "flags": obj.get("flags"), + "joined_at": obj.get("joined_at"), + "nick": obj.get("nick"), + "pending": obj.get("pending"), + "premium_since": obj.get("premium_since"), + "roles": obj.get("roles"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "mute": obj.get("mute"), + "deaf": obj.get("deaf") + }) + return _obj + + diff --git a/dc_rest/models/guild_mfa_level_response.py b/dc_rest/models/guild_mfa_level_response.py new file mode 100644 index 0000000..16be023 --- /dev/null +++ b/dc_rest/models/guild_mfa_level_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GuildMFALevelResponse(BaseModel): + """ + GuildMFALevelResponse + """ # noqa: E501 + level: StrictInt + __properties: ClassVar[List[str]] = ["level"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildMFALevelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildMFALevelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildMFALevelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "level": obj.get("level") + }) + return _obj + + diff --git a/dc_rest/models/guild_onboarding_response.py b/dc_rest/models/guild_onboarding_response.py new file mode 100644 index 0000000..dbf1e63 --- /dev/null +++ b/dc_rest/models/guild_onboarding_response.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildOnboardingResponse(BaseModel): + """ + GuildOnboardingResponse + """ # noqa: E501 + guild_id: Annotated[str, Field(strict=True)] + prompts: List[OnboardingPromptResponse] + default_channel_ids: List[Annotated[str, Field(strict=True)]] + enabled: StrictBool + __properties: ClassVar[List[str]] = ["guild_id", "prompts", "default_channel_ids", "enabled"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildOnboardingResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict['prompts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildOnboardingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildOnboardingResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_id": obj.get("guild_id"), + "prompts": [OnboardingPromptResponse.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None, + "default_channel_ids": obj.get("default_channel_ids"), + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/dc_rest/models/guild_patch_request_partial.py b/dc_rest/models/guild_patch_request_partial.py new file mode 100644 index 0000000..7b40751 --- /dev/null +++ b/dc_rest/models/guild_patch_request_partial.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildPatchRequestPartial(BaseModel): + """ + GuildPatchRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=100)]] = None + description: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=300)]] = None + region: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + verification_level: Optional[StrictInt] = None + default_message_notifications: Optional[StrictInt] = None + explicit_content_filter: Optional[StrictInt] = None + preferred_locale: Optional[StrictStr] = None + afk_timeout: Optional[StrictInt] = None + afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + owner_id: Optional[Annotated[str, Field(strict=True)]] = None + splash: Optional[StrictStr] = None + banner: Optional[StrictStr] = None + system_channel_flags: Optional[StrictInt] = None + features: Optional[Annotated[List[Optional[Annotated[str, Field(strict=True, max_length=152133)]]], Field(max_length=1521)]] = None + discovery_splash: Optional[StrictStr] = None + home_header: Optional[StrictStr] = None + rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + premium_progress_bar_enabled: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "description", "region", "icon", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_timeout", "afk_channel_id", "system_channel_id", "owner_id", "splash", "banner", "system_channel_flags", "features", "discovery_splash", "home_header", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled"] + + @field_validator('afk_channel_id') + def afk_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('system_channel_id') + def system_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('rules_channel_id') + def rules_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('safety_alerts_channel_id') + def safety_alerts_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('public_updates_channel_id') + def public_updates_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict['region'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if afk_timeout (nullable) is None + # and model_fields_set contains the field + if self.afk_timeout is None and "afk_timeout" in self.model_fields_set: + _dict['afk_timeout'] = None + + # set to None if splash (nullable) is None + # and model_fields_set contains the field + if self.splash is None and "splash" in self.model_fields_set: + _dict['splash'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if system_channel_flags (nullable) is None + # and model_fields_set contains the field + if self.system_channel_flags is None and "system_channel_flags" in self.model_fields_set: + _dict['system_channel_flags'] = None + + # set to None if features (nullable) is None + # and model_fields_set contains the field + if self.features is None and "features" in self.model_fields_set: + _dict['features'] = None + + # set to None if discovery_splash (nullable) is None + # and model_fields_set contains the field + if self.discovery_splash is None and "discovery_splash" in self.model_fields_set: + _dict['discovery_splash'] = None + + # set to None if home_header (nullable) is None + # and model_fields_set contains the field + if self.home_header is None and "home_header" in self.model_fields_set: + _dict['home_header'] = None + + # set to None if premium_progress_bar_enabled (nullable) is None + # and model_fields_set contains the field + if self.premium_progress_bar_enabled is None and "premium_progress_bar_enabled" in self.model_fields_set: + _dict['premium_progress_bar_enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "region": obj.get("region"), + "icon": obj.get("icon"), + "verification_level": obj.get("verification_level"), + "default_message_notifications": obj.get("default_message_notifications"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "preferred_locale": obj.get("preferred_locale"), + "afk_timeout": obj.get("afk_timeout"), + "afk_channel_id": obj.get("afk_channel_id"), + "system_channel_id": obj.get("system_channel_id"), + "owner_id": obj.get("owner_id"), + "splash": obj.get("splash"), + "banner": obj.get("banner"), + "system_channel_flags": obj.get("system_channel_flags"), + "features": obj.get("features"), + "discovery_splash": obj.get("discovery_splash"), + "home_header": obj.get("home_header"), + "rules_channel_id": obj.get("rules_channel_id"), + "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"), + "public_updates_channel_id": obj.get("public_updates_channel_id"), + "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled") + }) + return _obj + + diff --git a/dc_rest/models/guild_preview_response.py b/dc_rest/models/guild_preview_response.py new file mode 100644 index 0000000..62046e4 --- /dev/null +++ b/dc_rest/models/guild_preview_response.py @@ -0,0 +1,197 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildPreviewResponse(BaseModel): + """ + GuildPreviewResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: Optional[StrictStr] = None + home_header: Optional[StrictStr] = None + splash: Optional[StrictStr] = None + discovery_splash: Optional[StrictStr] = None + features: List[StrictStr] + approximate_member_count: StrictInt + approximate_presence_count: StrictInt + emojis: List[EmojiResponse] + stickers: List[GuildStickerResponse] + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "approximate_member_count", "approximate_presence_count", "emojis", "stickers"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildPreviewResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in emojis (list) + _items = [] + if self.emojis: + for _item_emojis in self.emojis: + if _item_emojis: + _items.append(_item_emojis.to_dict()) + _dict['emojis'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if home_header (nullable) is None + # and model_fields_set contains the field + if self.home_header is None and "home_header" in self.model_fields_set: + _dict['home_header'] = None + + # set to None if splash (nullable) is None + # and model_fields_set contains the field + if self.splash is None and "splash" in self.model_fields_set: + _dict['splash'] = None + + # set to None if discovery_splash (nullable) is None + # and model_fields_set contains the field + if self.discovery_splash is None and "discovery_splash" in self.model_fields_set: + _dict['discovery_splash'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildPreviewResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildPreviewResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "home_header": obj.get("home_header"), + "splash": obj.get("splash"), + "discovery_splash": obj.get("discovery_splash"), + "features": obj.get("features"), + "approximate_member_count": obj.get("approximate_member_count"), + "approximate_presence_count": obj.get("approximate_presence_count"), + "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None, + "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_product_purchase_response.py b/dc_rest/models/guild_product_purchase_response.py new file mode 100644 index 0000000..8ca700f --- /dev/null +++ b/dc_rest/models/guild_product_purchase_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildProductPurchaseResponse(BaseModel): + """ + GuildProductPurchaseResponse + """ # noqa: E501 + listing_id: Annotated[str, Field(strict=True)] + product_name: StrictStr + __properties: ClassVar[List[str]] = ["listing_id", "product_name"] + + @field_validator('listing_id') + def listing_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildProductPurchaseResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildProductPurchaseResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildProductPurchaseResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "listing_id": obj.get("listing_id"), + "product_name": obj.get("product_name") + }) + return _obj + + diff --git a/dc_rest/models/guild_prune_response.py b/dc_rest/models/guild_prune_response.py new file mode 100644 index 0000000..dec3d51 --- /dev/null +++ b/dc_rest/models/guild_prune_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GuildPruneResponse(BaseModel): + """ + GuildPruneResponse + """ # noqa: E501 + pruned: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["pruned"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildPruneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if pruned (nullable) is None + # and model_fields_set contains the field + if self.pruned is None and "pruned" in self.model_fields_set: + _dict['pruned'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildPruneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildPruneResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "pruned": obj.get("pruned") + }) + return _obj + + diff --git a/dc_rest/models/guild_response.py b/dc_rest/models/guild_response.py new file mode 100644 index 0000000..b544367 --- /dev/null +++ b/dc_rest/models/guild_response.py @@ -0,0 +1,376 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildResponse(BaseModel): + """ + GuildResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: Optional[StrictStr] = None + home_header: Optional[StrictStr] = None + splash: Optional[StrictStr] = None + discovery_splash: Optional[StrictStr] = None + features: List[StrictStr] + banner: Optional[StrictStr] = None + owner_id: Annotated[str, Field(strict=True)] + application_id: Optional[Annotated[str, Field(strict=True)]] = None + region: StrictStr + afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + afk_timeout: Optional[StrictInt] + system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_flags: StrictInt + widget_enabled: StrictBool + widget_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + verification_level: StrictInt + roles: List[GuildRoleResponse] + default_message_notifications: StrictInt + mfa_level: StrictInt + explicit_content_filter: StrictInt + max_presences: Optional[StrictInt] = None + max_members: Optional[StrictInt] = None + max_stage_video_channel_users: Optional[StrictInt] = None + max_video_channel_users: Optional[StrictInt] = None + vanity_url_code: Optional[StrictStr] = None + premium_tier: StrictInt + premium_subscription_count: StrictInt + preferred_locale: StrictStr + rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + premium_progress_bar_enabled: StrictBool + nsfw: StrictBool + nsfw_level: Optional[StrictInt] + emojis: List[EmojiResponse] + stickers: List[GuildStickerResponse] + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "banner", "owner_id", "application_id", "region", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "widget_enabled", "widget_channel_id", "verification_level", "roles", "default_message_notifications", "mfa_level", "explicit_content_filter", "max_presences", "max_members", "max_stage_video_channel_users", "max_video_channel_users", "vanity_url_code", "premium_tier", "premium_subscription_count", "preferred_locale", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled", "nsfw", "nsfw_level", "emojis", "stickers"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('afk_channel_id') + def afk_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('system_channel_id') + def system_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('widget_channel_id') + def widget_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('rules_channel_id') + def rules_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('safety_alerts_channel_id') + def safety_alerts_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('public_updates_channel_id') + def public_updates_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item_roles in self.roles: + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in emojis (list) + _items = [] + if self.emojis: + for _item_emojis in self.emojis: + if _item_emojis: + _items.append(_item_emojis.to_dict()) + _dict['emojis'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if home_header (nullable) is None + # and model_fields_set contains the field + if self.home_header is None and "home_header" in self.model_fields_set: + _dict['home_header'] = None + + # set to None if splash (nullable) is None + # and model_fields_set contains the field + if self.splash is None and "splash" in self.model_fields_set: + _dict['splash'] = None + + # set to None if discovery_splash (nullable) is None + # and model_fields_set contains the field + if self.discovery_splash is None and "discovery_splash" in self.model_fields_set: + _dict['discovery_splash'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if afk_timeout (nullable) is None + # and model_fields_set contains the field + if self.afk_timeout is None and "afk_timeout" in self.model_fields_set: + _dict['afk_timeout'] = None + + # set to None if max_presences (nullable) is None + # and model_fields_set contains the field + if self.max_presences is None and "max_presences" in self.model_fields_set: + _dict['max_presences'] = None + + # set to None if max_members (nullable) is None + # and model_fields_set contains the field + if self.max_members is None and "max_members" in self.model_fields_set: + _dict['max_members'] = None + + # set to None if max_stage_video_channel_users (nullable) is None + # and model_fields_set contains the field + if self.max_stage_video_channel_users is None and "max_stage_video_channel_users" in self.model_fields_set: + _dict['max_stage_video_channel_users'] = None + + # set to None if max_video_channel_users (nullable) is None + # and model_fields_set contains the field + if self.max_video_channel_users is None and "max_video_channel_users" in self.model_fields_set: + _dict['max_video_channel_users'] = None + + # set to None if vanity_url_code (nullable) is None + # and model_fields_set contains the field + if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set: + _dict['vanity_url_code'] = None + + # set to None if nsfw_level (nullable) is None + # and model_fields_set contains the field + if self.nsfw_level is None and "nsfw_level" in self.model_fields_set: + _dict['nsfw_level'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "home_header": obj.get("home_header"), + "splash": obj.get("splash"), + "discovery_splash": obj.get("discovery_splash"), + "features": obj.get("features"), + "banner": obj.get("banner"), + "owner_id": obj.get("owner_id"), + "application_id": obj.get("application_id"), + "region": obj.get("region"), + "afk_channel_id": obj.get("afk_channel_id"), + "afk_timeout": obj.get("afk_timeout"), + "system_channel_id": obj.get("system_channel_id"), + "system_channel_flags": obj.get("system_channel_flags"), + "widget_enabled": obj.get("widget_enabled"), + "widget_channel_id": obj.get("widget_channel_id"), + "verification_level": obj.get("verification_level"), + "roles": [GuildRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "default_message_notifications": obj.get("default_message_notifications"), + "mfa_level": obj.get("mfa_level"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "max_presences": obj.get("max_presences"), + "max_members": obj.get("max_members"), + "max_stage_video_channel_users": obj.get("max_stage_video_channel_users"), + "max_video_channel_users": obj.get("max_video_channel_users"), + "vanity_url_code": obj.get("vanity_url_code"), + "premium_tier": obj.get("premium_tier"), + "premium_subscription_count": obj.get("premium_subscription_count"), + "preferred_locale": obj.get("preferred_locale"), + "rules_channel_id": obj.get("rules_channel_id"), + "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"), + "public_updates_channel_id": obj.get("public_updates_channel_id"), + "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled"), + "nsfw": obj.get("nsfw"), + "nsfw_level": obj.get("nsfw_level"), + "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None, + "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_role_response.py b/dc_rest/models/guild_role_response.py new file mode 100644 index 0000000..2bd70bb --- /dev/null +++ b/dc_rest/models/guild_role_response.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildRoleResponse(BaseModel): + """ + GuildRoleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + permissions: StrictStr + position: StrictInt + color: StrictInt + hoist: StrictBool + managed: StrictBool + mentionable: StrictBool + icon: Optional[StrictStr] = None + unicode_emoji: Optional[StrictStr] = None + tags: Optional[GuildRoleTagsResponse] = None + __properties: ClassVar[List[str]] = ["id", "name", "description", "permissions", "position", "color", "hoist", "managed", "mentionable", "icon", "unicode_emoji", "tags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildRoleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tags + if self.tags: + _dict['tags'] = self.tags.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if unicode_emoji (nullable) is None + # and model_fields_set contains the field + if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set: + _dict['unicode_emoji'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildRoleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildRoleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "permissions": obj.get("permissions"), + "position": obj.get("position"), + "color": obj.get("color"), + "hoist": obj.get("hoist"), + "managed": obj.get("managed"), + "mentionable": obj.get("mentionable"), + "icon": obj.get("icon"), + "unicode_emoji": obj.get("unicode_emoji"), + "tags": GuildRoleTagsResponse.from_dict(obj["tags"]) if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_role_tags_response.py b/dc_rest/models/guild_role_tags_response.py new file mode 100644 index 0000000..89d1cc2 --- /dev/null +++ b/dc_rest/models/guild_role_tags_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildRoleTagsResponse(BaseModel): + """ + GuildRoleTagsResponse + """ # noqa: E501 + premium_subscriber: Optional[Any] = None + bot_id: Optional[Annotated[str, Field(strict=True)]] = None + integration_id: Optional[Annotated[str, Field(strict=True)]] = None + subscription_listing_id: Optional[Annotated[str, Field(strict=True)]] = None + available_for_purchase: Optional[Any] = None + guild_connections: Optional[Any] = None + __properties: ClassVar[List[str]] = ["premium_subscriber", "bot_id", "integration_id", "subscription_listing_id", "available_for_purchase", "guild_connections"] + + @field_validator('bot_id') + def bot_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('integration_id') + def integration_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('subscription_listing_id') + def subscription_listing_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildRoleTagsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if premium_subscriber (nullable) is None + # and model_fields_set contains the field + if self.premium_subscriber is None and "premium_subscriber" in self.model_fields_set: + _dict['premium_subscriber'] = None + + # set to None if available_for_purchase (nullable) is None + # and model_fields_set contains the field + if self.available_for_purchase is None and "available_for_purchase" in self.model_fields_set: + _dict['available_for_purchase'] = None + + # set to None if guild_connections (nullable) is None + # and model_fields_set contains the field + if self.guild_connections is None and "guild_connections" in self.model_fields_set: + _dict['guild_connections'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildRoleTagsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildRoleTagsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "premium_subscriber": obj.get("premium_subscriber"), + "bot_id": obj.get("bot_id"), + "integration_id": obj.get("integration_id"), + "subscription_listing_id": obj.get("subscription_listing_id"), + "available_for_purchase": obj.get("available_for_purchase"), + "guild_connections": obj.get("guild_connections") + }) + return _obj + + diff --git a/dc_rest/models/guild_sticker_response.py b/dc_rest/models/guild_sticker_response.py new file mode 100644 index 0000000..7106140 --- /dev/null +++ b/dc_rest/models/guild_sticker_response.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildStickerResponse(BaseModel): + """ + GuildStickerResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + tags: StrictStr + type: StrictInt + format_type: Optional[StrictInt] = None + description: Optional[StrictStr] = None + available: StrictBool + guild_id: Annotated[str, Field(strict=True)] + user: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["id", "name", "tags", "type", "format_type", "description", "available", "guild_id", "user"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildStickerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if format_type (nullable) is None + # and model_fields_set contains the field + if self.format_type is None and "format_type" in self.model_fields_set: + _dict['format_type'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildStickerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildStickerResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "tags": obj.get("tags"), + "type": obj.get("type"), + "format_type": obj.get("format_type"), + "description": obj.get("description"), + "available": obj.get("available"), + "guild_id": obj.get("guild_id"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_subscription_integration_response.py b/dc_rest/models/guild_subscription_integration_response.py new file mode 100644 index 0000000..789a343 --- /dev/null +++ b/dc_rest/models/guild_subscription_integration_response.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildSubscriptionIntegrationResponse(BaseModel): + """ + GuildSubscriptionIntegrationResponse + """ # noqa: E501 + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + enabled: Optional[StrictBool] = None + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "name", "account", "enabled", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildSubscriptionIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildSubscriptionIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildSubscriptionIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, + "enabled": obj.get("enabled"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/guild_template_channel_response.py b/dc_rest/models/guild_template_channel_response.py new file mode 100644 index 0000000..8f4a20e --- /dev/null +++ b/dc_rest/models/guild_template_channel_response.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse +from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags +from typing import Optional, Set +from typing_extensions import Self + +class GuildTemplateChannelResponse(BaseModel): + """ + GuildTemplateChannelResponse + """ # noqa: E501 + id: Optional[StrictInt] = None + type: StrictInt + name: Optional[StrictStr] = None + position: Optional[StrictInt] = None + topic: Optional[StrictStr] = None + bitrate: StrictInt + user_limit: StrictInt + nsfw: StrictBool + rate_limit_per_user: StrictInt + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + default_auto_archive_duration: Optional[StrictInt] = None + permission_overwrites: List[Optional[ChannelPermissionOverwriteResponse]] + available_tags: Optional[List[GuildTemplateChannelTags]] = None + template: StrictStr + default_reaction_emoji: Optional[DefaultReactionEmojiResponse] = None + default_thread_rate_limit_per_user: Optional[StrictInt] = None + default_sort_order: Optional[StrictInt] = None + default_forum_layout: Optional[StrictInt] = None + default_tag_setting: Optional[StrictStr] = None + icon_emoji: Optional[Dict[str, Any]] = None + theme_color: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "default_auto_archive_duration", "permission_overwrites", "available_tags", "template", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "icon_emoji", "theme_color"] + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildTemplateChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list) + _items = [] + if self.permission_overwrites: + for _item_permission_overwrites in self.permission_overwrites: + if _item_permission_overwrites: + _items.append(_item_permission_overwrites.to_dict()) + _dict['permission_overwrites'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list) + _items = [] + if self.available_tags: + for _item_available_tags in self.available_tags: + if _item_available_tags: + _items.append(_item_available_tags.to_dict()) + _dict['available_tags'] = _items + # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji + if self.default_reaction_emoji: + _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict() + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if topic (nullable) is None + # and model_fields_set contains the field + if self.topic is None and "topic" in self.model_fields_set: + _dict['topic'] = None + + # set to None if available_tags (nullable) is None + # and model_fields_set contains the field + if self.available_tags is None and "available_tags" in self.model_fields_set: + _dict['available_tags'] = None + + # set to None if default_reaction_emoji (nullable) is None + # and model_fields_set contains the field + if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set: + _dict['default_reaction_emoji'] = None + + # set to None if default_thread_rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set: + _dict['default_thread_rate_limit_per_user'] = None + + # set to None if theme_color (nullable) is None + # and model_fields_set contains the field + if self.theme_color is None and "theme_color" in self.model_fields_set: + _dict['theme_color'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildTemplateChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildTemplateChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "position": obj.get("position"), + "topic": obj.get("topic"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "nsfw": obj.get("nsfw"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "parent_id": obj.get("parent_id"), + "default_auto_archive_duration": obj.get("default_auto_archive_duration"), + "permission_overwrites": [ChannelPermissionOverwriteResponse.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None, + "available_tags": [GuildTemplateChannelTags.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None, + "template": obj.get("template"), + "default_reaction_emoji": DefaultReactionEmojiResponse.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None, + "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"), + "default_sort_order": obj.get("default_sort_order"), + "default_forum_layout": obj.get("default_forum_layout"), + "default_tag_setting": obj.get("default_tag_setting"), + "icon_emoji": obj.get("icon_emoji"), + "theme_color": obj.get("theme_color") + }) + return _obj + + diff --git a/dc_rest/models/guild_template_channel_tags.py b/dc_rest/models/guild_template_channel_tags.py new file mode 100644 index 0000000..a05be27 --- /dev/null +++ b/dc_rest/models/guild_template_channel_tags.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildTemplateChannelTags(BaseModel): + """ + GuildTemplateChannelTags + """ # noqa: E501 + name: StrictStr + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[StrictStr] = None + moderated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "emoji_id", "emoji_name", "moderated"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildTemplateChannelTags from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + # set to None if moderated (nullable) is None + # and model_fields_set contains the field + if self.moderated is None and "moderated" in self.model_fields_set: + _dict['moderated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildTemplateChannelTags from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildTemplateChannelTags) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "moderated": obj.get("moderated") + }) + return _obj + + diff --git a/dc_rest/models/guild_template_response.py b/dc_rest/models/guild_template_response.py new file mode 100644 index 0000000..acb0a23 --- /dev/null +++ b/dc_rest/models/guild_template_response.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildTemplateResponse(BaseModel): + """ + GuildTemplateResponse + """ # noqa: E501 + code: StrictStr + name: StrictStr + description: Optional[StrictStr] = None + usage_count: StrictInt + creator_id: Annotated[str, Field(strict=True)] + creator: Optional[UserResponse] = None + created_at: datetime + updated_at: datetime + source_guild_id: Annotated[str, Field(strict=True)] + serialized_source_guild: GuildTemplateSnapshotResponse + is_dirty: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["code", "name", "description", "usage_count", "creator_id", "creator", "created_at", "updated_at", "source_guild_id", "serialized_source_guild", "is_dirty"] + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('source_guild_id') + def source_guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildTemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator + if self.creator: + _dict['creator'] = self.creator.to_dict() + # override the default output from pydantic by calling `to_dict()` of serialized_source_guild + if self.serialized_source_guild: + _dict['serialized_source_guild'] = self.serialized_source_guild.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creator (nullable) is None + # and model_fields_set contains the field + if self.creator is None and "creator" in self.model_fields_set: + _dict['creator'] = None + + # set to None if is_dirty (nullable) is None + # and model_fields_set contains the field + if self.is_dirty is None and "is_dirty" in self.model_fields_set: + _dict['is_dirty'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildTemplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildTemplateResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "name": obj.get("name"), + "description": obj.get("description"), + "usage_count": obj.get("usage_count"), + "creator_id": obj.get("creator_id"), + "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None, + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "source_guild_id": obj.get("source_guild_id"), + "serialized_source_guild": GuildTemplateSnapshotResponse.from_dict(obj["serialized_source_guild"]) if obj.get("serialized_source_guild") is not None else None, + "is_dirty": obj.get("is_dirty") + }) + return _obj + + diff --git a/dc_rest/models/guild_template_role_response.py b/dc_rest/models/guild_template_role_response.py new file mode 100644 index 0000000..630e5e9 --- /dev/null +++ b/dc_rest/models/guild_template_role_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GuildTemplateRoleResponse(BaseModel): + """ + GuildTemplateRoleResponse + """ # noqa: E501 + id: StrictInt + name: StrictStr + permissions: StrictStr + color: StrictInt + hoist: StrictBool + mentionable: StrictBool + icon: Optional[StrictStr] = None + unicode_emoji: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name", "permissions", "color", "hoist", "mentionable", "icon", "unicode_emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildTemplateRoleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if unicode_emoji (nullable) is None + # and model_fields_set contains the field + if self.unicode_emoji is None and "unicode_emoji" in self.model_fields_set: + _dict['unicode_emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildTemplateRoleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildTemplateRoleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "permissions": obj.get("permissions"), + "color": obj.get("color"), + "hoist": obj.get("hoist"), + "mentionable": obj.get("mentionable"), + "icon": obj.get("icon"), + "unicode_emoji": obj.get("unicode_emoji") + }) + return _obj + + diff --git a/dc_rest/models/guild_template_snapshot_response.py b/dc_rest/models/guild_template_snapshot_response.py new file mode 100644 index 0000000..29877d7 --- /dev/null +++ b/dc_rest/models/guild_template_snapshot_response.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse +from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildTemplateSnapshotResponse(BaseModel): + """ + GuildTemplateSnapshotResponse + """ # noqa: E501 + name: StrictStr + description: Optional[StrictStr] = None + region: Optional[StrictStr] = None + verification_level: StrictInt + default_message_notifications: StrictInt + explicit_content_filter: StrictInt + preferred_locale: StrictStr + afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + afk_timeout: Optional[StrictInt] + system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_flags: StrictInt + roles: List[GuildTemplateRoleResponse] + channels: List[GuildTemplateChannelResponse] + __properties: ClassVar[List[str]] = ["name", "description", "region", "verification_level", "default_message_notifications", "explicit_content_filter", "preferred_locale", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "roles", "channels"] + + @field_validator('afk_channel_id') + def afk_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('system_channel_id') + def system_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildTemplateSnapshotResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item_roles in self.roles: + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in channels (list) + _items = [] + if self.channels: + for _item_channels in self.channels: + if _item_channels: + _items.append(_item_channels.to_dict()) + _dict['channels'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict['region'] = None + + # set to None if afk_timeout (nullable) is None + # and model_fields_set contains the field + if self.afk_timeout is None and "afk_timeout" in self.model_fields_set: + _dict['afk_timeout'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildTemplateSnapshotResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildTemplateSnapshotResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "region": obj.get("region"), + "verification_level": obj.get("verification_level"), + "default_message_notifications": obj.get("default_message_notifications"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "preferred_locale": obj.get("preferred_locale"), + "afk_channel_id": obj.get("afk_channel_id"), + "afk_timeout": obj.get("afk_timeout"), + "system_channel_id": obj.get("system_channel_id"), + "system_channel_flags": obj.get("system_channel_flags"), + "roles": [GuildTemplateRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "channels": [GuildTemplateChannelResponse.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_welcome_channel.py b/dc_rest/models/guild_welcome_channel.py new file mode 100644 index 0000000..65df650 --- /dev/null +++ b/dc_rest/models/guild_welcome_channel.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildWelcomeChannel(BaseModel): + """ + GuildWelcomeChannel + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + description: Annotated[str, Field(min_length=1, strict=True, max_length=50)] + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + __properties: ClassVar[List[str]] = ["channel_id", "description", "emoji_id", "emoji_name"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildWelcomeChannel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildWelcomeChannel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildWelcomeChannel) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "description": obj.get("description"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/guild_welcome_screen_channel_response.py b/dc_rest/models/guild_welcome_screen_channel_response.py new file mode 100644 index 0000000..d278da7 --- /dev/null +++ b/dc_rest/models/guild_welcome_screen_channel_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class GuildWelcomeScreenChannelResponse(BaseModel): + """ + GuildWelcomeScreenChannelResponse + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + description: StrictStr + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["channel_id", "description", "emoji_id", "emoji_name"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildWelcomeScreenChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildWelcomeScreenChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildWelcomeScreenChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "description": obj.get("description"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/guild_welcome_screen_response.py b/dc_rest/models/guild_welcome_screen_response.py new file mode 100644 index 0000000..5b96657 --- /dev/null +++ b/dc_rest/models/guild_welcome_screen_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildWelcomeScreenResponse(BaseModel): + """ + GuildWelcomeScreenResponse + """ # noqa: E501 + description: Optional[StrictStr] = None + welcome_channels: List[GuildWelcomeScreenChannelResponse] + __properties: ClassVar[List[str]] = ["description", "welcome_channels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildWelcomeScreenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in welcome_channels (list) + _items = [] + if self.welcome_channels: + for _item_welcome_channels in self.welcome_channels: + if _item_welcome_channels: + _items.append(_item_welcome_channels.to_dict()) + _dict['welcome_channels'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildWelcomeScreenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildWelcomeScreenResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "welcome_channels": [GuildWelcomeScreenChannelResponse.from_dict(_item) for _item in obj["welcome_channels"]] if obj.get("welcome_channels") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/guild_with_counts_response.py b/dc_rest/models/guild_with_counts_response.py new file mode 100644 index 0000000..2df716d --- /dev/null +++ b/dc_rest/models/guild_with_counts_response.py @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from typing import Optional, Set +from typing_extensions import Self + +class GuildWithCountsResponse(BaseModel): + """ + GuildWithCountsResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: Optional[StrictStr] = None + home_header: Optional[StrictStr] = None + splash: Optional[StrictStr] = None + discovery_splash: Optional[StrictStr] = None + features: List[StrictStr] + banner: Optional[StrictStr] = None + owner_id: Annotated[str, Field(strict=True)] + application_id: Optional[Annotated[str, Field(strict=True)]] = None + region: StrictStr + afk_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + afk_timeout: Optional[StrictInt] + system_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + system_channel_flags: StrictInt + widget_enabled: StrictBool + widget_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + verification_level: StrictInt + roles: List[GuildRoleResponse] + default_message_notifications: StrictInt + mfa_level: StrictInt + explicit_content_filter: StrictInt + max_presences: Optional[StrictInt] = None + max_members: Optional[StrictInt] = None + max_stage_video_channel_users: Optional[StrictInt] = None + max_video_channel_users: Optional[StrictInt] = None + vanity_url_code: Optional[StrictStr] = None + premium_tier: StrictInt + premium_subscription_count: StrictInt + preferred_locale: StrictStr + rules_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + safety_alerts_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + public_updates_channel_id: Optional[Annotated[str, Field(strict=True)]] = None + premium_progress_bar_enabled: StrictBool + nsfw: StrictBool + nsfw_level: Optional[StrictInt] + emojis: List[EmojiResponse] + stickers: List[GuildStickerResponse] + approximate_member_count: Optional[StrictInt] = None + approximate_presence_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "home_header", "splash", "discovery_splash", "features", "banner", "owner_id", "application_id", "region", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "widget_enabled", "widget_channel_id", "verification_level", "roles", "default_message_notifications", "mfa_level", "explicit_content_filter", "max_presences", "max_members", "max_stage_video_channel_users", "max_video_channel_users", "vanity_url_code", "premium_tier", "premium_subscription_count", "preferred_locale", "rules_channel_id", "safety_alerts_channel_id", "public_updates_channel_id", "premium_progress_bar_enabled", "nsfw", "nsfw_level", "emojis", "stickers", "approximate_member_count", "approximate_presence_count"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('afk_channel_id') + def afk_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('system_channel_id') + def system_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('widget_channel_id') + def widget_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('rules_channel_id') + def rules_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('safety_alerts_channel_id') + def safety_alerts_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('public_updates_channel_id') + def public_updates_channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GuildWithCountsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item_roles in self.roles: + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in emojis (list) + _items = [] + if self.emojis: + for _item_emojis in self.emojis: + if _item_emojis: + _items.append(_item_emojis.to_dict()) + _dict['emojis'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if home_header (nullable) is None + # and model_fields_set contains the field + if self.home_header is None and "home_header" in self.model_fields_set: + _dict['home_header'] = None + + # set to None if splash (nullable) is None + # and model_fields_set contains the field + if self.splash is None and "splash" in self.model_fields_set: + _dict['splash'] = None + + # set to None if discovery_splash (nullable) is None + # and model_fields_set contains the field + if self.discovery_splash is None and "discovery_splash" in self.model_fields_set: + _dict['discovery_splash'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if afk_timeout (nullable) is None + # and model_fields_set contains the field + if self.afk_timeout is None and "afk_timeout" in self.model_fields_set: + _dict['afk_timeout'] = None + + # set to None if max_presences (nullable) is None + # and model_fields_set contains the field + if self.max_presences is None and "max_presences" in self.model_fields_set: + _dict['max_presences'] = None + + # set to None if max_members (nullable) is None + # and model_fields_set contains the field + if self.max_members is None and "max_members" in self.model_fields_set: + _dict['max_members'] = None + + # set to None if max_stage_video_channel_users (nullable) is None + # and model_fields_set contains the field + if self.max_stage_video_channel_users is None and "max_stage_video_channel_users" in self.model_fields_set: + _dict['max_stage_video_channel_users'] = None + + # set to None if max_video_channel_users (nullable) is None + # and model_fields_set contains the field + if self.max_video_channel_users is None and "max_video_channel_users" in self.model_fields_set: + _dict['max_video_channel_users'] = None + + # set to None if vanity_url_code (nullable) is None + # and model_fields_set contains the field + if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set: + _dict['vanity_url_code'] = None + + # set to None if nsfw_level (nullable) is None + # and model_fields_set contains the field + if self.nsfw_level is None and "nsfw_level" in self.model_fields_set: + _dict['nsfw_level'] = None + + # set to None if approximate_member_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set: + _dict['approximate_member_count'] = None + + # set to None if approximate_presence_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_presence_count is None and "approximate_presence_count" in self.model_fields_set: + _dict['approximate_presence_count'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GuildWithCountsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in GuildWithCountsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "home_header": obj.get("home_header"), + "splash": obj.get("splash"), + "discovery_splash": obj.get("discovery_splash"), + "features": obj.get("features"), + "banner": obj.get("banner"), + "owner_id": obj.get("owner_id"), + "application_id": obj.get("application_id"), + "region": obj.get("region"), + "afk_channel_id": obj.get("afk_channel_id"), + "afk_timeout": obj.get("afk_timeout"), + "system_channel_id": obj.get("system_channel_id"), + "system_channel_flags": obj.get("system_channel_flags"), + "widget_enabled": obj.get("widget_enabled"), + "widget_channel_id": obj.get("widget_channel_id"), + "verification_level": obj.get("verification_level"), + "roles": [GuildRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "default_message_notifications": obj.get("default_message_notifications"), + "mfa_level": obj.get("mfa_level"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "max_presences": obj.get("max_presences"), + "max_members": obj.get("max_members"), + "max_stage_video_channel_users": obj.get("max_stage_video_channel_users"), + "max_video_channel_users": obj.get("max_video_channel_users"), + "vanity_url_code": obj.get("vanity_url_code"), + "premium_tier": obj.get("premium_tier"), + "premium_subscription_count": obj.get("premium_subscription_count"), + "preferred_locale": obj.get("preferred_locale"), + "rules_channel_id": obj.get("rules_channel_id"), + "safety_alerts_channel_id": obj.get("safety_alerts_channel_id"), + "public_updates_channel_id": obj.get("public_updates_channel_id"), + "premium_progress_bar_enabled": obj.get("premium_progress_bar_enabled"), + "nsfw": obj.get("nsfw"), + "nsfw_level": obj.get("nsfw_level"), + "emojis": [EmojiResponse.from_dict(_item) for _item in obj["emojis"]] if obj.get("emojis") is not None else None, + "stickers": [GuildStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None, + "approximate_member_count": obj.get("approximate_member_count"), + "approximate_presence_count": obj.get("approximate_presence_count") + }) + return _obj + + diff --git a/dc_rest/models/incoming_webhook_interaction_request.py b/dc_rest/models/incoming_webhook_interaction_request.py new file mode 100644 index 0000000..1cf418b --- /dev/null +++ b/dc_rest/models/incoming_webhook_interaction_request.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class IncomingWebhookInteractionRequest(BaseModel): + """ + IncomingWebhookInteractionRequest + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + tts: Optional[StrictBool] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "tts", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingWebhookInteractionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if tts (nullable) is None + # and model_fields_set contains the field + if self.tts is None and "tts" in self.model_fields_set: + _dict['tts'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingWebhookInteractionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in IncomingWebhookInteractionRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "tts": obj.get("tts"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/incoming_webhook_request_partial.py b/dc_rest/models/incoming_webhook_request_partial.py new file mode 100644 index 0000000..069c5a0 --- /dev/null +++ b/dc_rest/models/incoming_webhook_request_partial.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class IncomingWebhookRequestPartial(BaseModel): + """ + IncomingWebhookRequestPartial + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + tts: Optional[StrictBool] = None + flags: Optional[StrictInt] = None + username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = None + avatar_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + thread_name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=100)]] = None + applied_tags: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=5)]] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "tts", "flags", "username", "avatar_url", "thread_name", "applied_tags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingWebhookRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if tts (nullable) is None + # and model_fields_set contains the field + if self.tts is None and "tts" in self.model_fields_set: + _dict['tts'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if avatar_url (nullable) is None + # and model_fields_set contains the field + if self.avatar_url is None and "avatar_url" in self.model_fields_set: + _dict['avatar_url'] = None + + # set to None if thread_name (nullable) is None + # and model_fields_set contains the field + if self.thread_name is None and "thread_name" in self.model_fields_set: + _dict['thread_name'] = None + + # set to None if applied_tags (nullable) is None + # and model_fields_set contains the field + if self.applied_tags is None and "applied_tags" in self.model_fields_set: + _dict['applied_tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingWebhookRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in IncomingWebhookRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "tts": obj.get("tts"), + "flags": obj.get("flags"), + "username": obj.get("username"), + "avatar_url": obj.get("avatar_url"), + "thread_name": obj.get("thread_name"), + "applied_tags": obj.get("applied_tags") + }) + return _obj + + diff --git a/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py b/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py new file mode 100644 index 0000000..d2c9630 --- /dev/null +++ b/dc_rest/models/incoming_webhook_update_for_interaction_callback_request_partial.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class IncomingWebhookUpdateForInteractionCallbackRequestPartial(BaseModel): + """ + IncomingWebhookUpdateForInteractionCallbackRequestPartial + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in IncomingWebhookUpdateForInteractionCallbackRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/incoming_webhook_update_request_partial.py b/dc_rest/models/incoming_webhook_update_request_partial.py new file mode 100644 index 0000000..b25cfde --- /dev/null +++ b/dc_rest/models/incoming_webhook_update_request_partial.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class IncomingWebhookUpdateRequestPartial(BaseModel): + """ + IncomingWebhookUpdateRequestPartial + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "components", "attachments", "poll", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingWebhookUpdateRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingWebhookUpdateRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in IncomingWebhookUpdateRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/inner_errors.py b/dc_rest/models/inner_errors.py new file mode 100644 index 0000000..e3522f0 --- /dev/null +++ b/dc_rest/models/inner_errors.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from dc_rest.models.error import Error +from typing import Optional, Set +from typing_extensions import Self + +class InnerErrors(BaseModel): + """ + InnerErrors + """ # noqa: E501 + errors: List[Error] = Field(description="The list of errors for this field", alias="_errors") + __properties: ClassVar[List[str]] = ["_errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InnerErrors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['_errors'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InnerErrors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InnerErrors) in the input: " + _key) + + _obj = cls.model_validate({ + "_errors": [Error.from_dict(_item) for _item in obj["_errors"]] if obj.get("_errors") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/integration_application_response.py b/dc_rest/models/integration_application_response.py new file mode 100644 index 0000000..b71f233 --- /dev/null +++ b/dc_rest/models/integration_application_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class IntegrationApplicationResponse(BaseModel): + """ + IntegrationApplicationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: StrictStr + type: Optional[StrictInt] = None + cover_image: Optional[StrictStr] = None + primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None + bot: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('primary_sku_id') + def primary_sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntegrationApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bot + if self.bot: + _dict['bot'] = self.bot.to_dict() + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntegrationApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in IntegrationApplicationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "type": obj.get("type"), + "cover_image": obj.get("cover_image"), + "primary_sku_id": obj.get("primary_sku_id"), + "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py new file mode 100644 index 0000000..5e7195e --- /dev/null +++ b/dc_rest/models/interaction_application_command_autocomplete_callback_integer_data.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice +from typing import Optional, Set +from typing_extensions import Self + +class InteractionApplicationCommandAutocompleteCallbackIntegerData(BaseModel): + """ + InteractionApplicationCommandAutocompleteCallbackIntegerData + """ # noqa: E501 + choices: Optional[Annotated[List[Optional[ApplicationCommandOptionIntegerChoice]], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackIntegerData) in the input: " + _key) + + _obj = cls.model_validate({ + "choices": [ApplicationCommandOptionIntegerChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py new file mode 100644 index 0000000..599e38a --- /dev/null +++ b/dc_rest/models/interaction_application_command_autocomplete_callback_number_data.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice +from typing import Optional, Set +from typing_extensions import Self + +class InteractionApplicationCommandAutocompleteCallbackNumberData(BaseModel): + """ + InteractionApplicationCommandAutocompleteCallbackNumberData + """ # noqa: E501 + choices: Optional[Annotated[List[Optional[ApplicationCommandOptionNumberChoice]], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackNumberData) in the input: " + _key) + + _obj = cls.model_validate({ + "choices": [ApplicationCommandOptionNumberChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py b/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py new file mode 100644 index 0000000..78aa288 --- /dev/null +++ b/dc_rest/models/interaction_application_command_autocomplete_callback_string_data.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice +from typing import Optional, Set +from typing_extensions import Self + +class InteractionApplicationCommandAutocompleteCallbackStringData(BaseModel): + """ + InteractionApplicationCommandAutocompleteCallbackStringData + """ # noqa: E501 + choices: Optional[Annotated[List[Optional[ApplicationCommandOptionStringChoice]], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item_choices in self.choices: + if _item_choices: + _items.append(_item_choices.to_dict()) + _dict['choices'] = _items + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InteractionApplicationCommandAutocompleteCallbackStringData) in the input: " + _key) + + _obj = cls.model_validate({ + "choices": [ApplicationCommandOptionStringChoice.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/interaction_callback_response.py b/dc_rest/models/interaction_callback_response.py new file mode 100644 index 0000000..d0b7ecc --- /dev/null +++ b/dc_rest/models/interaction_callback_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource +from dc_rest.models.interaction_response import InteractionResponse +from typing import Optional, Set +from typing_extensions import Self + +class InteractionCallbackResponse(BaseModel): + """ + InteractionCallbackResponse + """ # noqa: E501 + interaction: InteractionResponse + resource: Optional[InteractionCallbackResponseResource] = None + __properties: ClassVar[List[str]] = ["interaction", "resource"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InteractionCallbackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of interaction + if self.interaction: + _dict['interaction'] = self.interaction.to_dict() + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # set to None if resource (nullable) is None + # and model_fields_set contains the field + if self.resource is None and "resource" in self.model_fields_set: + _dict['resource'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InteractionCallbackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InteractionCallbackResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "interaction": InteractionResponse.from_dict(obj["interaction"]) if obj.get("interaction") is not None else None, + "resource": InteractionCallbackResponseResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/interaction_callback_response_resource.py b/dc_rest/models/interaction_callback_response_resource.py new file mode 100644 index 0000000..2885e30 --- /dev/null +++ b/dc_rest/models/interaction_callback_response_resource.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse +from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse +from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +INTERACTIONCALLBACKRESPONSERESOURCE_ONE_OF_SCHEMAS = ["CreateMessageInteractionCallbackResponse", "LaunchActivityInteractionCallbackResponse", "UpdateMessageInteractionCallbackResponse"] + +class InteractionCallbackResponseResource(BaseModel): + """ + InteractionCallbackResponseResource + """ + # data type: CreateMessageInteractionCallbackResponse + oneof_schema_1_validator: Optional[CreateMessageInteractionCallbackResponse] = None + # data type: LaunchActivityInteractionCallbackResponse + oneof_schema_2_validator: Optional[LaunchActivityInteractionCallbackResponse] = None + # data type: UpdateMessageInteractionCallbackResponse + oneof_schema_3_validator: Optional[UpdateMessageInteractionCallbackResponse] = None + actual_instance: Optional[Union[CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse]] = None + one_of_schemas: Set[str] = { "CreateMessageInteractionCallbackResponse", "LaunchActivityInteractionCallbackResponse", "UpdateMessageInteractionCallbackResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = InteractionCallbackResponseResource.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateMessageInteractionCallbackResponse + if not isinstance(v, CreateMessageInteractionCallbackResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMessageInteractionCallbackResponse`") + else: + match += 1 + # validate data type: LaunchActivityInteractionCallbackResponse + if not isinstance(v, LaunchActivityInteractionCallbackResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `LaunchActivityInteractionCallbackResponse`") + else: + match += 1 + # validate data type: UpdateMessageInteractionCallbackResponse + if not isinstance(v, UpdateMessageInteractionCallbackResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateMessageInteractionCallbackResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into CreateMessageInteractionCallbackResponse + try: + instance.actual_instance = CreateMessageInteractionCallbackResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LaunchActivityInteractionCallbackResponse + try: + instance.actual_instance = LaunchActivityInteractionCallbackResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UpdateMessageInteractionCallbackResponse + try: + instance.actual_instance = UpdateMessageInteractionCallbackResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into InteractionCallbackResponseResource with oneOf schemas: CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateMessageInteractionCallbackResponse, LaunchActivityInteractionCallbackResponse, UpdateMessageInteractionCallbackResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/interaction_response.py b/dc_rest/models/interaction_response.py new file mode 100644 index 0000000..6245c48 --- /dev/null +++ b/dc_rest/models/interaction_response.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class InteractionResponse(BaseModel): + """ + InteractionResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + response_message_id: Optional[Annotated[str, Field(strict=True)]] = None + response_message_loading: Optional[StrictBool] = None + response_message_ephemeral: Optional[StrictBool] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "type", "response_message_id", "response_message_loading", "response_message_ephemeral", "channel_id", "guild_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('response_message_id') + def response_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InteractionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if response_message_loading (nullable) is None + # and model_fields_set contains the field + if self.response_message_loading is None and "response_message_loading" in self.model_fields_set: + _dict['response_message_loading'] = None + + # set to None if response_message_ephemeral (nullable) is None + # and model_fields_set contains the field + if self.response_message_ephemeral is None and "response_message_ephemeral" in self.model_fields_set: + _dict['response_message_ephemeral'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InteractionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InteractionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "response_message_id": obj.get("response_message_id"), + "response_message_loading": obj.get("response_message_loading"), + "response_message_ephemeral": obj.get("response_message_ephemeral"), + "channel_id": obj.get("channel_id"), + "guild_id": obj.get("guild_id") + }) + return _obj + + diff --git a/dc_rest/models/invite_application_response.py b/dc_rest/models/invite_application_response.py new file mode 100644 index 0000000..44c3e24 --- /dev/null +++ b/dc_rest/models/invite_application_response.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class InviteApplicationResponse(BaseModel): + """ + InviteApplicationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: StrictStr + type: Optional[StrictInt] = None + cover_image: Optional[StrictStr] = None + primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None + bot: Optional[UserResponse] = None + slug: Optional[StrictStr] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + rpc_origins: Optional[List[Optional[StrictStr]]] = None + bot_public: Optional[StrictBool] = None + bot_require_code_grant: Optional[StrictBool] = None + terms_of_service_url: Optional[StrictStr] = None + privacy_policy_url: Optional[StrictStr] = None + custom_install_url: Optional[StrictStr] = None + install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None + integration_types_config: Optional[Dict[str, ApplicationIntegrationTypeConfigurationResponse]] = None + verify_key: StrictStr + flags: StrictInt + max_participants: Optional[StrictInt] = None + tags: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot", "slug", "guild_id", "rpc_origins", "bot_public", "bot_require_code_grant", "terms_of_service_url", "privacy_policy_url", "custom_install_url", "install_params", "integration_types_config", "verify_key", "flags", "max_participants", "tags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('primary_sku_id') + def primary_sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bot + if self.bot: + _dict['bot'] = self.bot.to_dict() + # override the default output from pydantic by calling `to_dict()` of install_params + if self.install_params: + _dict['install_params'] = self.install_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict) + _field_dict = {} + if self.integration_types_config: + for _key_integration_types_config in self.integration_types_config: + if self.integration_types_config[_key_integration_types_config]: + _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict() + _dict['integration_types_config'] = _field_dict + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + # set to None if slug (nullable) is None + # and model_fields_set contains the field + if self.slug is None and "slug" in self.model_fields_set: + _dict['slug'] = None + + # set to None if rpc_origins (nullable) is None + # and model_fields_set contains the field + if self.rpc_origins is None and "rpc_origins" in self.model_fields_set: + _dict['rpc_origins'] = None + + # set to None if bot_public (nullable) is None + # and model_fields_set contains the field + if self.bot_public is None and "bot_public" in self.model_fields_set: + _dict['bot_public'] = None + + # set to None if bot_require_code_grant (nullable) is None + # and model_fields_set contains the field + if self.bot_require_code_grant is None and "bot_require_code_grant" in self.model_fields_set: + _dict['bot_require_code_grant'] = None + + # set to None if terms_of_service_url (nullable) is None + # and model_fields_set contains the field + if self.terms_of_service_url is None and "terms_of_service_url" in self.model_fields_set: + _dict['terms_of_service_url'] = None + + # set to None if privacy_policy_url (nullable) is None + # and model_fields_set contains the field + if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set: + _dict['privacy_policy_url'] = None + + # set to None if custom_install_url (nullable) is None + # and model_fields_set contains the field + if self.custom_install_url is None and "custom_install_url" in self.model_fields_set: + _dict['custom_install_url'] = None + + # set to None if install_params (nullable) is None + # and model_fields_set contains the field + if self.install_params is None and "install_params" in self.model_fields_set: + _dict['install_params'] = None + + # set to None if max_participants (nullable) is None + # and model_fields_set contains the field + if self.max_participants is None and "max_participants" in self.model_fields_set: + _dict['max_participants'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InviteApplicationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "type": obj.get("type"), + "cover_image": obj.get("cover_image"), + "primary_sku_id": obj.get("primary_sku_id"), + "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None, + "slug": obj.get("slug"), + "guild_id": obj.get("guild_id"), + "rpc_origins": obj.get("rpc_origins"), + "bot_public": obj.get("bot_public"), + "bot_require_code_grant": obj.get("bot_require_code_grant"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "custom_install_url": obj.get("custom_install_url"), + "install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None, + "integration_types_config": dict( + (_k, ApplicationIntegrationTypeConfigurationResponse.from_dict(_v)) + for _k, _v in obj["integration_types_config"].items() + ) + if obj.get("integration_types_config") is not None + else None, + "verify_key": obj.get("verify_key"), + "flags": obj.get("flags"), + "max_participants": obj.get("max_participants"), + "tags": obj.get("tags") + }) + return _obj + + diff --git a/dc_rest/models/invite_channel_recipient_response.py b/dc_rest/models/invite_channel_recipient_response.py new file mode 100644 index 0000000..ed9a462 --- /dev/null +++ b/dc_rest/models/invite_channel_recipient_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InviteChannelRecipientResponse(BaseModel): + """ + InviteChannelRecipientResponse + """ # noqa: E501 + username: StrictStr + __properties: ClassVar[List[str]] = ["username"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteChannelRecipientResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteChannelRecipientResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InviteChannelRecipientResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "username": obj.get("username") + }) + return _obj + + diff --git a/dc_rest/models/invite_channel_response.py b/dc_rest/models/invite_channel_response.py new file mode 100644 index 0000000..0405719 --- /dev/null +++ b/dc_rest/models/invite_channel_response.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse +from typing import Optional, Set +from typing_extensions import Self + +class InviteChannelResponse(BaseModel): + """ + InviteChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + name: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + recipients: Optional[List[InviteChannelRecipientResponse]] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "icon", "recipients"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if recipients (nullable) is None + # and model_fields_set contains the field + if self.recipients is None and "recipients" in self.model_fields_set: + _dict['recipients'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InviteChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "recipients": [InviteChannelRecipientResponse.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/invite_guild_response.py b/dc_rest/models/invite_guild_response.py new file mode 100644 index 0000000..e1d09ff --- /dev/null +++ b/dc_rest/models/invite_guild_response.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class InviteGuildResponse(BaseModel): + """ + InviteGuildResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + splash: Optional[StrictStr] = None + banner: Optional[StrictStr] = None + description: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + features: List[StrictStr] + verification_level: Optional[StrictInt] = None + vanity_url_code: Optional[StrictStr] = None + nsfw_level: Optional[StrictInt] = None + nsfw: Optional[StrictBool] = None + premium_subscription_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "splash", "banner", "description", "icon", "features", "verification_level", "vanity_url_code", "nsfw_level", "nsfw", "premium_subscription_count"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteGuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if splash (nullable) is None + # and model_fields_set contains the field + if self.splash is None and "splash" in self.model_fields_set: + _dict['splash'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if vanity_url_code (nullable) is None + # and model_fields_set contains the field + if self.vanity_url_code is None and "vanity_url_code" in self.model_fields_set: + _dict['vanity_url_code'] = None + + # set to None if nsfw_level (nullable) is None + # and model_fields_set contains the field + if self.nsfw_level is None and "nsfw_level" in self.model_fields_set: + _dict['nsfw_level'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + # set to None if premium_subscription_count (nullable) is None + # and model_fields_set contains the field + if self.premium_subscription_count is None and "premium_subscription_count" in self.model_fields_set: + _dict['premium_subscription_count'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteGuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in InviteGuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "splash": obj.get("splash"), + "banner": obj.get("banner"), + "description": obj.get("description"), + "icon": obj.get("icon"), + "features": obj.get("features"), + "verification_level": obj.get("verification_level"), + "vanity_url_code": obj.get("vanity_url_code"), + "nsfw_level": obj.get("nsfw_level"), + "nsfw": obj.get("nsfw"), + "premium_subscription_count": obj.get("premium_subscription_count") + }) + return _obj + + diff --git a/dc_rest/models/keyword_rule_response.py b/dc_rest/models/keyword_rule_response.py new file mode 100644 index 0000000..d1576af --- /dev/null +++ b/dc_rest/models/keyword_rule_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class KeywordRuleResponse(BaseModel): + """ + KeywordRuleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + creator_id: Annotated[str, Field(strict=True)] + name: StrictStr + event_type: StrictInt + actions: List[DefaultKeywordRuleResponseActionsInner] + trigger_type: StrictInt + enabled: Optional[StrictBool] = None + exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None + exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None + trigger_metadata: KeywordTriggerMetadataResponse + __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in KeywordRuleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "creator_id": obj.get("creator_id"), + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "trigger_type": obj.get("trigger_type"), + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_metadata": KeywordTriggerMetadataResponse.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/keyword_trigger_metadata.py b/dc_rest/models/keyword_trigger_metadata.py new file mode 100644 index 0000000..bf07d9e --- /dev/null +++ b/dc_rest/models/keyword_trigger_metadata.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class KeywordTriggerMetadata(BaseModel): + """ + KeywordTriggerMetadata + """ # noqa: E501 + keyword_filter: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=1000)]] = None + regex_patterns: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=260)]], Field(max_length=10)]] = None + allow_list: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=60)]], Field(max_length=100)]] = None + __properties: ClassVar[List[str]] = ["keyword_filter", "regex_patterns", "allow_list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordTriggerMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if keyword_filter (nullable) is None + # and model_fields_set contains the field + if self.keyword_filter is None and "keyword_filter" in self.model_fields_set: + _dict['keyword_filter'] = None + + # set to None if regex_patterns (nullable) is None + # and model_fields_set contains the field + if self.regex_patterns is None and "regex_patterns" in self.model_fields_set: + _dict['regex_patterns'] = None + + # set to None if allow_list (nullable) is None + # and model_fields_set contains the field + if self.allow_list is None and "allow_list" in self.model_fields_set: + _dict['allow_list'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordTriggerMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in KeywordTriggerMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "keyword_filter": obj.get("keyword_filter"), + "regex_patterns": obj.get("regex_patterns"), + "allow_list": obj.get("allow_list") + }) + return _obj + + diff --git a/dc_rest/models/keyword_trigger_metadata_response.py b/dc_rest/models/keyword_trigger_metadata_response.py new file mode 100644 index 0000000..94e3ad6 --- /dev/null +++ b/dc_rest/models/keyword_trigger_metadata_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class KeywordTriggerMetadataResponse(BaseModel): + """ + KeywordTriggerMetadataResponse + """ # noqa: E501 + keyword_filter: List[StrictStr] + regex_patterns: List[StrictStr] + allow_list: List[StrictStr] + __properties: ClassVar[List[str]] = ["keyword_filter", "regex_patterns", "allow_list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordTriggerMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordTriggerMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in KeywordTriggerMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "keyword_filter": obj.get("keyword_filter"), + "regex_patterns": obj.get("regex_patterns"), + "allow_list": obj.get("allow_list") + }) + return _obj + + diff --git a/dc_rest/models/keyword_upsert_request.py b/dc_rest/models/keyword_upsert_request.py new file mode 100644 index 0000000..a898363 --- /dev/null +++ b/dc_rest/models/keyword_upsert_request.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata +from typing import Optional, Set +from typing_extensions import Self + +class KeywordUpsertRequest(BaseModel): + """ + KeywordUpsertRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + event_type: StrictInt + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: StrictInt + trigger_metadata: Optional[KeywordTriggerMetadata] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordUpsertRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + # set to None if trigger_metadata (nullable) is None + # and model_fields_set contains the field + if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set: + _dict['trigger_metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordUpsertRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in KeywordUpsertRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": KeywordTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/keyword_upsert_request_partial.py b/dc_rest/models/keyword_upsert_request_partial.py new file mode 100644 index 0000000..2f5db74 --- /dev/null +++ b/dc_rest/models/keyword_upsert_request_partial.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata +from typing import Optional, Set +from typing_extensions import Self + +class KeywordUpsertRequestPartial(BaseModel): + """ + KeywordUpsertRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + event_type: Optional[StrictInt] = None + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: Optional[StrictInt] = None + trigger_metadata: Optional[KeywordTriggerMetadata] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordUpsertRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + # set to None if trigger_metadata (nullable) is None + # and model_fields_set contains the field + if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set: + _dict['trigger_metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordUpsertRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in KeywordUpsertRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": KeywordTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/launch_activity_interaction_callback_request.py b/dc_rest/models/launch_activity_interaction_callback_request.py new file mode 100644 index 0000000..2e42f83 --- /dev/null +++ b/dc_rest/models/launch_activity_interaction_callback_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LaunchActivityInteractionCallbackRequest(BaseModel): + """ + LaunchActivityInteractionCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LaunchActivityInteractionCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LaunchActivityInteractionCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LaunchActivityInteractionCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/launch_activity_interaction_callback_response.py b/dc_rest/models/launch_activity_interaction_callback_response.py new file mode 100644 index 0000000..b155cb0 --- /dev/null +++ b/dc_rest/models/launch_activity_interaction_callback_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LaunchActivityInteractionCallbackResponse(BaseModel): + """ + LaunchActivityInteractionCallbackResponse + """ # noqa: E501 + type: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LaunchActivityInteractionCallbackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LaunchActivityInteractionCallbackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LaunchActivityInteractionCallbackResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/list_application_emojis_response.py b/dc_rest/models/list_application_emojis_response.py new file mode 100644 index 0000000..a9091cd --- /dev/null +++ b/dc_rest/models/list_application_emojis_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.emoji_response import EmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListApplicationEmojisResponse(BaseModel): + """ + ListApplicationEmojisResponse + """ # noqa: E501 + items: List[EmojiResponse] + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListApplicationEmojisResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListApplicationEmojisResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ListApplicationEmojisResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "items": [EmojiResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/list_auto_moderation_rules200_response_inner.py b/dc_rest/models/list_auto_moderation_rules200_response_inner.py new file mode 100644 index 0000000..d9152e4 --- /dev/null +++ b/dc_rest/models/list_auto_moderation_rules200_response_inner.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse +from dc_rest.models.keyword_rule_response import KeywordRuleResponse +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LISTAUTOMODERATIONRULES200RESPONSEINNER_ONE_OF_SCHEMAS = ["DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse"] + +class ListAutoModerationRules200ResponseInner(BaseModel): + """ + ListAutoModerationRules200ResponseInner + """ + # data type: DefaultKeywordRuleResponse + oneof_schema_1_validator: Optional[DefaultKeywordRuleResponse] = None + # data type: KeywordRuleResponse + oneof_schema_2_validator: Optional[KeywordRuleResponse] = None + # data type: MLSpamRuleResponse + oneof_schema_3_validator: Optional[MLSpamRuleResponse] = None + # data type: MentionSpamRuleResponse + oneof_schema_4_validator: Optional[MentionSpamRuleResponse] = None + # data type: SpamLinkRuleResponse + oneof_schema_5_validator: Optional[SpamLinkRuleResponse] = None + actual_instance: Optional[Union[DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]] = None + one_of_schemas: Set[str] = { "DefaultKeywordRuleResponse", "KeywordRuleResponse", "MLSpamRuleResponse", "MentionSpamRuleResponse", "SpamLinkRuleResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = ListAutoModerationRules200ResponseInner.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultKeywordRuleResponse + if not isinstance(v, DefaultKeywordRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordRuleResponse`") + else: + match += 1 + # validate data type: KeywordRuleResponse + if not isinstance(v, KeywordRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordRuleResponse`") + else: + match += 1 + # validate data type: MLSpamRuleResponse + if not isinstance(v, MLSpamRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamRuleResponse`") + else: + match += 1 + # validate data type: MentionSpamRuleResponse + if not isinstance(v, MentionSpamRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamRuleResponse`") + else: + match += 1 + # validate data type: SpamLinkRuleResponse + if not isinstance(v, SpamLinkRuleResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SpamLinkRuleResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into DefaultKeywordRuleResponse + try: + instance.actual_instance = DefaultKeywordRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into KeywordRuleResponse + try: + instance.actual_instance = KeywordRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MLSpamRuleResponse + try: + instance.actual_instance = MLSpamRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MentionSpamRuleResponse + try: + instance.actual_instance = MentionSpamRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SpamLinkRuleResponse + try: + instance.actual_instance = SpamLinkRuleResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ListAutoModerationRules200ResponseInner with oneOf schemas: DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordRuleResponse, KeywordRuleResponse, MLSpamRuleResponse, MentionSpamRuleResponse, SpamLinkRuleResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/list_channel_invites200_response_inner.py b/dc_rest/models/list_channel_invites200_response_inner.py new file mode 100644 index 0000000..75234c8 --- /dev/null +++ b/dc_rest/models/list_channel_invites200_response_inner.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.friend_invite_response import FriendInviteResponse +from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse +from dc_rest.models.guild_invite_response import GuildInviteResponse +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +LISTCHANNELINVITES200RESPONSEINNER_ANY_OF_SCHEMAS = ["FriendInviteResponse", "GroupDMInviteResponse", "GuildInviteResponse"] + +class ListChannelInvites200ResponseInner(BaseModel): + """ + ListChannelInvites200ResponseInner + """ + + # data type: FriendInviteResponse + anyof_schema_1_validator: Optional[FriendInviteResponse] = None + # data type: GroupDMInviteResponse + anyof_schema_2_validator: Optional[GroupDMInviteResponse] = None + # data type: GuildInviteResponse + anyof_schema_3_validator: Optional[GuildInviteResponse] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[FriendInviteResponse, GroupDMInviteResponse, GuildInviteResponse]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "FriendInviteResponse", "GroupDMInviteResponse", "GuildInviteResponse" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ListChannelInvites200ResponseInner.model_construct() + error_messages = [] + # validate data type: FriendInviteResponse + if not isinstance(v, FriendInviteResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `FriendInviteResponse`") + else: + return v + + # validate data type: GroupDMInviteResponse + if not isinstance(v, GroupDMInviteResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GroupDMInviteResponse`") + else: + return v + + # validate data type: GuildInviteResponse + if not isinstance(v, GuildInviteResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildInviteResponse`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ListChannelInvites200ResponseInner with anyOf schemas: FriendInviteResponse, GroupDMInviteResponse, GuildInviteResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[FriendInviteResponse] = None + try: + instance.actual_instance = FriendInviteResponse.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[GroupDMInviteResponse] = None + try: + instance.actual_instance = GroupDMInviteResponse.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[GuildInviteResponse] = None + try: + instance.actual_instance = GuildInviteResponse.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ListChannelInvites200ResponseInner with anyOf schemas: FriendInviteResponse, GroupDMInviteResponse, GuildInviteResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], FriendInviteResponse, GroupDMInviteResponse, GuildInviteResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/list_channel_webhooks200_response_inner.py b/dc_rest/models/list_channel_webhooks200_response_inner.py new file mode 100644 index 0000000..f14d105 --- /dev/null +++ b/dc_rest/models/list_channel_webhooks200_response_inner.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse +from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LISTCHANNELWEBHOOKS200RESPONSEINNER_ONE_OF_SCHEMAS = ["ApplicationIncomingWebhookResponse", "ChannelFollowerWebhookResponse", "GuildIncomingWebhookResponse"] + +class ListChannelWebhooks200ResponseInner(BaseModel): + """ + ListChannelWebhooks200ResponseInner + """ + # data type: ApplicationIncomingWebhookResponse + oneof_schema_1_validator: Optional[ApplicationIncomingWebhookResponse] = None + # data type: ChannelFollowerWebhookResponse + oneof_schema_2_validator: Optional[ChannelFollowerWebhookResponse] = None + # data type: GuildIncomingWebhookResponse + oneof_schema_3_validator: Optional[GuildIncomingWebhookResponse] = None + actual_instance: Optional[Union[ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse]] = None + one_of_schemas: Set[str] = { "ApplicationIncomingWebhookResponse", "ChannelFollowerWebhookResponse", "GuildIncomingWebhookResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ListChannelWebhooks200ResponseInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationIncomingWebhookResponse + if not isinstance(v, ApplicationIncomingWebhookResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationIncomingWebhookResponse`") + else: + match += 1 + # validate data type: ChannelFollowerWebhookResponse + if not isinstance(v, ChannelFollowerWebhookResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ChannelFollowerWebhookResponse`") + else: + match += 1 + # validate data type: GuildIncomingWebhookResponse + if not isinstance(v, GuildIncomingWebhookResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildIncomingWebhookResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ListChannelWebhooks200ResponseInner with oneOf schemas: ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ListChannelWebhooks200ResponseInner with oneOf schemas: ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationIncomingWebhookResponse + try: + instance.actual_instance = ApplicationIncomingWebhookResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ChannelFollowerWebhookResponse + try: + instance.actual_instance = ChannelFollowerWebhookResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into GuildIncomingWebhookResponse + try: + instance.actual_instance = GuildIncomingWebhookResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ListChannelWebhooks200ResponseInner with oneOf schemas: ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ListChannelWebhooks200ResponseInner with oneOf schemas: ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationIncomingWebhookResponse, ChannelFollowerWebhookResponse, GuildIncomingWebhookResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/list_guild_integrations200_response_inner.py b/dc_rest/models/list_guild_integrations200_response_inner.py new file mode 100644 index 0000000..968ffc3 --- /dev/null +++ b/dc_rest/models/list_guild_integrations200_response_inner.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.discord_integration_response import DiscordIntegrationResponse +from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse +from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LISTGUILDINTEGRATIONS200RESPONSEINNER_ONE_OF_SCHEMAS = ["DiscordIntegrationResponse", "ExternalConnectionIntegrationResponse", "GuildSubscriptionIntegrationResponse"] + +class ListGuildIntegrations200ResponseInner(BaseModel): + """ + ListGuildIntegrations200ResponseInner + """ + # data type: DiscordIntegrationResponse + oneof_schema_1_validator: Optional[DiscordIntegrationResponse] = None + # data type: ExternalConnectionIntegrationResponse + oneof_schema_2_validator: Optional[ExternalConnectionIntegrationResponse] = None + # data type: GuildSubscriptionIntegrationResponse + oneof_schema_3_validator: Optional[GuildSubscriptionIntegrationResponse] = None + actual_instance: Optional[Union[DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse]] = None + one_of_schemas: Set[str] = { "DiscordIntegrationResponse", "ExternalConnectionIntegrationResponse", "GuildSubscriptionIntegrationResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ListGuildIntegrations200ResponseInner.model_construct() + error_messages = [] + match = 0 + # validate data type: DiscordIntegrationResponse + if not isinstance(v, DiscordIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `DiscordIntegrationResponse`") + else: + match += 1 + # validate data type: ExternalConnectionIntegrationResponse + if not isinstance(v, ExternalConnectionIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExternalConnectionIntegrationResponse`") + else: + match += 1 + # validate data type: GuildSubscriptionIntegrationResponse + if not isinstance(v, GuildSubscriptionIntegrationResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GuildSubscriptionIntegrationResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ListGuildIntegrations200ResponseInner with oneOf schemas: DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ListGuildIntegrations200ResponseInner with oneOf schemas: DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DiscordIntegrationResponse + try: + instance.actual_instance = DiscordIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ExternalConnectionIntegrationResponse + try: + instance.actual_instance = ExternalConnectionIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into GuildSubscriptionIntegrationResponse + try: + instance.actual_instance = GuildSubscriptionIntegrationResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ListGuildIntegrations200ResponseInner with oneOf schemas: DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ListGuildIntegrations200ResponseInner with oneOf schemas: DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DiscordIntegrationResponse, ExternalConnectionIntegrationResponse, GuildSubscriptionIntegrationResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/list_guild_scheduled_events200_response_inner.py b/dc_rest/models/list_guild_scheduled_events200_response_inner.py new file mode 100644 index 0000000..4f4d89c --- /dev/null +++ b/dc_rest/models/list_guild_scheduled_events200_response_inner.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse +from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse +from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LISTGUILDSCHEDULEDEVENTS200RESPONSEINNER_ONE_OF_SCHEMAS = ["ExternalScheduledEventResponse", "StageScheduledEventResponse", "VoiceScheduledEventResponse"] + +class ListGuildScheduledEvents200ResponseInner(BaseModel): + """ + ListGuildScheduledEvents200ResponseInner + """ + # data type: ExternalScheduledEventResponse + oneof_schema_1_validator: Optional[ExternalScheduledEventResponse] = None + # data type: StageScheduledEventResponse + oneof_schema_2_validator: Optional[StageScheduledEventResponse] = None + # data type: VoiceScheduledEventResponse + oneof_schema_3_validator: Optional[VoiceScheduledEventResponse] = None + actual_instance: Optional[Union[ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse]] = None + one_of_schemas: Set[str] = { "ExternalScheduledEventResponse", "StageScheduledEventResponse", "VoiceScheduledEventResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ListGuildScheduledEvents200ResponseInner.model_construct() + error_messages = [] + match = 0 + # validate data type: ExternalScheduledEventResponse + if not isinstance(v, ExternalScheduledEventResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExternalScheduledEventResponse`") + else: + match += 1 + # validate data type: StageScheduledEventResponse + if not isinstance(v, StageScheduledEventResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `StageScheduledEventResponse`") + else: + match += 1 + # validate data type: VoiceScheduledEventResponse + if not isinstance(v, VoiceScheduledEventResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `VoiceScheduledEventResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ListGuildScheduledEvents200ResponseInner with oneOf schemas: ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ListGuildScheduledEvents200ResponseInner with oneOf schemas: ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ExternalScheduledEventResponse + try: + instance.actual_instance = ExternalScheduledEventResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StageScheduledEventResponse + try: + instance.actual_instance = StageScheduledEventResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VoiceScheduledEventResponse + try: + instance.actual_instance = VoiceScheduledEventResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ListGuildScheduledEvents200ResponseInner with oneOf schemas: ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ListGuildScheduledEvents200ResponseInner with oneOf schemas: ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExternalScheduledEventResponse, StageScheduledEventResponse, VoiceScheduledEventResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/list_guild_soundboard_sounds_response.py b/dc_rest/models/list_guild_soundboard_sounds_response.py new file mode 100644 index 0000000..6d04fd8 --- /dev/null +++ b/dc_rest/models/list_guild_soundboard_sounds_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListGuildSoundboardSoundsResponse(BaseModel): + """ + ListGuildSoundboardSoundsResponse + """ # noqa: E501 + items: List[SoundboardSoundResponse] + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListGuildSoundboardSoundsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListGuildSoundboardSoundsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ListGuildSoundboardSoundsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "items": [SoundboardSoundResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/lobby_member_request.py b/dc_rest/models/lobby_member_request.py new file mode 100644 index 0000000..1c029d5 --- /dev/null +++ b/dc_rest/models/lobby_member_request.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LobbyMemberRequest(BaseModel): + """ + LobbyMemberRequest + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + metadata: Optional[Dict[str, Annotated[str, Field(strict=True, max_length=1024)]]] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "metadata", "flags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('flags') + def flags_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([1]): + raise ValueError("must be one of enum values (1)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LobbyMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LobbyMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LobbyMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/lobby_member_response.py b/dc_rest/models/lobby_member_response.py new file mode 100644 index 0000000..741d088 --- /dev/null +++ b/dc_rest/models/lobby_member_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LobbyMemberResponse(BaseModel): + """ + LobbyMemberResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + metadata: Optional[Dict[str, StrictStr]] = None + flags: StrictInt + __properties: ClassVar[List[str]] = ["id", "metadata", "flags"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LobbyMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LobbyMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LobbyMemberResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/lobby_message_response.py b/dc_rest/models/lobby_message_response.py new file mode 100644 index 0000000..db38d89 --- /dev/null +++ b/dc_rest/models/lobby_message_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class LobbyMessageResponse(BaseModel): + """ + LobbyMessageResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + content: StrictStr + lobby_id: Annotated[str, Field(strict=True)] + channel_id: Annotated[str, Field(strict=True)] + author: UserResponse + metadata: Optional[Dict[str, StrictStr]] = None + flags: StrictInt + application_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "type", "content", "lobby_id", "channel_id", "author", "metadata", "flags", "application_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('lobby_id') + def lobby_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LobbyMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LobbyMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LobbyMessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "content": obj.get("content"), + "lobby_id": obj.get("lobby_id"), + "channel_id": obj.get("channel_id"), + "author": UserResponse.from_dict(obj["author"]) if obj.get("author") is not None else None, + "metadata": obj.get("metadata"), + "flags": obj.get("flags"), + "application_id": obj.get("application_id") + }) + return _obj + + diff --git a/dc_rest/models/lobby_response.py b/dc_rest/models/lobby_response.py new file mode 100644 index 0000000..cfc7b4b --- /dev/null +++ b/dc_rest/models/lobby_response.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_channel_response import GuildChannelResponse +from dc_rest.models.lobby_member_response import LobbyMemberResponse +from typing import Optional, Set +from typing_extensions import Self + +class LobbyResponse(BaseModel): + """ + LobbyResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + application_id: Annotated[str, Field(strict=True)] + metadata: Optional[Dict[str, StrictStr]] = None + members: Optional[List[LobbyMemberResponse]] = None + linked_channel: Optional[GuildChannelResponse] = None + __properties: ClassVar[List[str]] = ["id", "application_id", "metadata", "members", "linked_channel"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LobbyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # override the default output from pydantic by calling `to_dict()` of linked_channel + if self.linked_channel: + _dict['linked_channel'] = self.linked_channel.to_dict() + # set to None if members (nullable) is None + # and model_fields_set contains the field + if self.members is None and "members" in self.model_fields_set: + _dict['members'] = None + + # set to None if linked_channel (nullable) is None + # and model_fields_set contains the field + if self.linked_channel is None and "linked_channel" in self.model_fields_set: + _dict['linked_channel'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LobbyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in LobbyResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "application_id": obj.get("application_id"), + "metadata": obj.get("metadata"), + "members": [LobbyMemberResponse.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "linked_channel": GuildChannelResponse.from_dict(obj["linked_channel"]) if obj.get("linked_channel") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/media_gallery_component_for_message_request.py b/dc_rest/models/media_gallery_component_for_message_request.py new file mode 100644 index 0000000..535f739 --- /dev/null +++ b/dc_rest/models/media_gallery_component_for_message_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest +from typing import Optional, Set +from typing_extensions import Self + +class MediaGalleryComponentForMessageRequest(BaseModel): + """ + MediaGalleryComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + items: Annotated[List[MediaGalleryItemRequest], Field(min_length=1, max_length=10)] + __properties: ClassVar[List[str]] = ["type", "items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaGalleryComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaGalleryComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MediaGalleryComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "items": [MediaGalleryItemRequest.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/media_gallery_component_response.py b/dc_rest/models/media_gallery_component_response.py new file mode 100644 index 0000000..151d655 --- /dev/null +++ b/dc_rest/models/media_gallery_component_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse +from typing import Optional, Set +from typing_extensions import Self + +class MediaGalleryComponentResponse(BaseModel): + """ + MediaGalleryComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + items: List[MediaGalleryItemResponse] + __properties: ClassVar[List[str]] = ["type", "id", "items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaGalleryComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaGalleryComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MediaGalleryComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "items": [MediaGalleryItemResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/media_gallery_item_request.py b/dc_rest/models/media_gallery_item_request.py new file mode 100644 index 0000000..d48960e --- /dev/null +++ b/dc_rest/models/media_gallery_item_request.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest +from typing import Optional, Set +from typing_extensions import Self + +class MediaGalleryItemRequest(BaseModel): + """ + MediaGalleryItemRequest + """ # noqa: E501 + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1024)]] = None + spoiler: Optional[StrictBool] = None + media: UnfurledMediaRequest + __properties: ClassVar[List[str]] = ["description", "spoiler", "media"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaGalleryItemRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of media + if self.media: + _dict['media'] = self.media.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if spoiler (nullable) is None + # and model_fields_set contains the field + if self.spoiler is None and "spoiler" in self.model_fields_set: + _dict['spoiler'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaGalleryItemRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MediaGalleryItemRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "spoiler": obj.get("spoiler"), + "media": UnfurledMediaRequest.from_dict(obj["media"]) if obj.get("media") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/media_gallery_item_response.py b/dc_rest/models/media_gallery_item_response.py new file mode 100644 index 0000000..37d784f --- /dev/null +++ b/dc_rest/models/media_gallery_item_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse +from typing import Optional, Set +from typing_extensions import Self + +class MediaGalleryItemResponse(BaseModel): + """ + MediaGalleryItemResponse + """ # noqa: E501 + media: UnfurledMediaResponse + description: Optional[StrictStr] = None + spoiler: StrictBool + __properties: ClassVar[List[str]] = ["media", "description", "spoiler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaGalleryItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of media + if self.media: + _dict['media'] = self.media.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaGalleryItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MediaGalleryItemResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "media": UnfurledMediaResponse.from_dict(obj["media"]) if obj.get("media") is not None else None, + "description": obj.get("description"), + "spoiler": obj.get("spoiler") + }) + return _obj + + diff --git a/dc_rest/models/mention_spam_rule_response.py b/dc_rest/models/mention_spam_rule_response.py new file mode 100644 index 0000000..224ea0a --- /dev/null +++ b/dc_rest/models/mention_spam_rule_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class MentionSpamRuleResponse(BaseModel): + """ + MentionSpamRuleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + creator_id: Annotated[str, Field(strict=True)] + name: StrictStr + event_type: StrictInt + actions: List[DefaultKeywordRuleResponseActionsInner] + trigger_type: StrictInt + enabled: Optional[StrictBool] = None + exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None + exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None + trigger_metadata: MentionSpamTriggerMetadataResponse + __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionSpamRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionSpamRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionSpamRuleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "creator_id": obj.get("creator_id"), + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "trigger_type": obj.get("trigger_type"), + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_metadata": MentionSpamTriggerMetadataResponse.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/mention_spam_trigger_metadata.py b/dc_rest/models/mention_spam_trigger_metadata.py new file mode 100644 index 0000000..7c0d0f5 --- /dev/null +++ b/dc_rest/models/mention_spam_trigger_metadata.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MentionSpamTriggerMetadata(BaseModel): + """ + MentionSpamTriggerMetadata + """ # noqa: E501 + mention_total_limit: Annotated[int, Field(le=50, strict=True, ge=0)] + mention_raid_protection_enabled: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["mention_total_limit", "mention_raid_protection_enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionSpamTriggerMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if mention_raid_protection_enabled (nullable) is None + # and model_fields_set contains the field + if self.mention_raid_protection_enabled is None and "mention_raid_protection_enabled" in self.model_fields_set: + _dict['mention_raid_protection_enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionSpamTriggerMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionSpamTriggerMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "mention_total_limit": obj.get("mention_total_limit"), + "mention_raid_protection_enabled": obj.get("mention_raid_protection_enabled") + }) + return _obj + + diff --git a/dc_rest/models/mention_spam_trigger_metadata_response.py b/dc_rest/models/mention_spam_trigger_metadata_response.py new file mode 100644 index 0000000..8511290 --- /dev/null +++ b/dc_rest/models/mention_spam_trigger_metadata_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MentionSpamTriggerMetadataResponse(BaseModel): + """ + MentionSpamTriggerMetadataResponse + """ # noqa: E501 + mention_total_limit: StrictInt + mention_raid_protection_enabled: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["mention_total_limit", "mention_raid_protection_enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionSpamTriggerMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if mention_raid_protection_enabled (nullable) is None + # and model_fields_set contains the field + if self.mention_raid_protection_enabled is None and "mention_raid_protection_enabled" in self.model_fields_set: + _dict['mention_raid_protection_enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionSpamTriggerMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionSpamTriggerMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "mention_total_limit": obj.get("mention_total_limit"), + "mention_raid_protection_enabled": obj.get("mention_raid_protection_enabled") + }) + return _obj + + diff --git a/dc_rest/models/mention_spam_upsert_request.py b/dc_rest/models/mention_spam_upsert_request.py new file mode 100644 index 0000000..d62f7d6 --- /dev/null +++ b/dc_rest/models/mention_spam_upsert_request.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata +from typing import Optional, Set +from typing_extensions import Self + +class MentionSpamUpsertRequest(BaseModel): + """ + MentionSpamUpsertRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + event_type: StrictInt + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: StrictInt + trigger_metadata: Optional[MentionSpamTriggerMetadata] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionSpamUpsertRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + # set to None if trigger_metadata (nullable) is None + # and model_fields_set contains the field + if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set: + _dict['trigger_metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionSpamUpsertRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionSpamUpsertRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": MentionSpamTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/mention_spam_upsert_request_partial.py b/dc_rest/models/mention_spam_upsert_request_partial.py new file mode 100644 index 0000000..85d74b4 --- /dev/null +++ b/dc_rest/models/mention_spam_upsert_request_partial.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata +from typing import Optional, Set +from typing_extensions import Self + +class MentionSpamUpsertRequestPartial(BaseModel): + """ + MentionSpamUpsertRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + event_type: Optional[StrictInt] = None + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: Optional[StrictInt] = None + trigger_metadata: Optional[MentionSpamTriggerMetadata] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionSpamUpsertRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # override the default output from pydantic by calling `to_dict()` of trigger_metadata + if self.trigger_metadata: + _dict['trigger_metadata'] = self.trigger_metadata.to_dict() + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + # set to None if trigger_metadata (nullable) is None + # and model_fields_set contains the field + if self.trigger_metadata is None and "trigger_metadata" in self.model_fields_set: + _dict['trigger_metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionSpamUpsertRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionSpamUpsertRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": MentionSpamTriggerMetadata.from_dict(obj["trigger_metadata"]) if obj.get("trigger_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/mentionable_select_component_for_message_request.py b/dc_rest/models/mentionable_select_component_for_message_request.py new file mode 100644 index 0000000..ee345c6 --- /dev/null +++ b/dc_rest/models/mentionable_select_component_for_message_request.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner +from typing import Optional, Set +from typing_extensions import Self + +class MentionableSelectComponentForMessageRequest(BaseModel): + """ + MentionableSelectComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None + max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None + disabled: Optional[StrictBool] = None + default_values: Optional[Annotated[List[MentionableSelectComponentForMessageRequestDefaultValuesInner], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionableSelectComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionableSelectComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionableSelectComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [MentionableSelectComponentForMessageRequestDefaultValuesInner.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/mentionable_select_component_for_message_request_default_values_inner.py b/dc_rest/models/mentionable_select_component_for_message_request_default_values_inner.py new file mode 100644 index 0000000..ef7f1e6 --- /dev/null +++ b/dc_rest/models/mentionable_select_component_for_message_request_default_values_inner.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue +from dc_rest.models.user_select_default_value import UserSelectDefaultValue +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MENTIONABLESELECTCOMPONENTFORMESSAGEREQUESTDEFAULTVALUESINNER_ONE_OF_SCHEMAS = ["RoleSelectDefaultValue", "UserSelectDefaultValue"] + +class MentionableSelectComponentForMessageRequestDefaultValuesInner(BaseModel): + """ + MentionableSelectComponentForMessageRequestDefaultValuesInner + """ + # data type: RoleSelectDefaultValue + oneof_schema_1_validator: Optional[RoleSelectDefaultValue] = None + # data type: UserSelectDefaultValue + oneof_schema_2_validator: Optional[UserSelectDefaultValue] = None + actual_instance: Optional[Union[RoleSelectDefaultValue, UserSelectDefaultValue]] = None + one_of_schemas: Set[str] = { "RoleSelectDefaultValue", "UserSelectDefaultValue" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = MentionableSelectComponentForMessageRequestDefaultValuesInner.model_construct() + error_messages = [] + match = 0 + # validate data type: RoleSelectDefaultValue + if not isinstance(v, RoleSelectDefaultValue): + error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectDefaultValue`") + else: + match += 1 + # validate data type: UserSelectDefaultValue + if not isinstance(v, UserSelectDefaultValue): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectDefaultValue`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in MentionableSelectComponentForMessageRequestDefaultValuesInner with oneOf schemas: RoleSelectDefaultValue, UserSelectDefaultValue. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MentionableSelectComponentForMessageRequestDefaultValuesInner with oneOf schemas: RoleSelectDefaultValue, UserSelectDefaultValue. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RoleSelectDefaultValue + try: + instance.actual_instance = RoleSelectDefaultValue.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserSelectDefaultValue + try: + instance.actual_instance = UserSelectDefaultValue.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into MentionableSelectComponentForMessageRequestDefaultValuesInner with oneOf schemas: RoleSelectDefaultValue, UserSelectDefaultValue. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MentionableSelectComponentForMessageRequestDefaultValuesInner with oneOf schemas: RoleSelectDefaultValue, UserSelectDefaultValue. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RoleSelectDefaultValue, UserSelectDefaultValue]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/mentionable_select_component_response.py b/dc_rest/models/mentionable_select_component_response.py new file mode 100644 index 0000000..d17d0b7 --- /dev/null +++ b/dc_rest/models/mentionable_select_component_response.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner +from typing import Optional, Set +from typing_extensions import Self + +class MentionableSelectComponentResponse(BaseModel): + """ + MentionableSelectComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + placeholder: Optional[StrictStr] = None + min_values: Optional[StrictInt] = None + max_values: Optional[StrictInt] = None + disabled: Optional[StrictBool] = None + default_values: Optional[List[MentionableSelectComponentResponseDefaultValuesInner]] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MentionableSelectComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MentionableSelectComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MentionableSelectComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [MentionableSelectComponentResponseDefaultValuesInner.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/mentionable_select_component_response_default_values_inner.py b/dc_rest/models/mentionable_select_component_response_default_values_inner.py new file mode 100644 index 0000000..272c5ca --- /dev/null +++ b/dc_rest/models/mentionable_select_component_response_default_values_inner.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MENTIONABLESELECTCOMPONENTRESPONSEDEFAULTVALUESINNER_ONE_OF_SCHEMAS = ["RoleSelectDefaultValueResponse", "UserSelectDefaultValueResponse"] + +class MentionableSelectComponentResponseDefaultValuesInner(BaseModel): + """ + MentionableSelectComponentResponseDefaultValuesInner + """ + # data type: RoleSelectDefaultValueResponse + oneof_schema_1_validator: Optional[RoleSelectDefaultValueResponse] = None + # data type: UserSelectDefaultValueResponse + oneof_schema_2_validator: Optional[UserSelectDefaultValueResponse] = None + actual_instance: Optional[Union[RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse]] = None + one_of_schemas: Set[str] = { "RoleSelectDefaultValueResponse", "UserSelectDefaultValueResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = MentionableSelectComponentResponseDefaultValuesInner.model_construct() + error_messages = [] + match = 0 + # validate data type: RoleSelectDefaultValueResponse + if not isinstance(v, RoleSelectDefaultValueResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `RoleSelectDefaultValueResponse`") + else: + match += 1 + # validate data type: UserSelectDefaultValueResponse + if not isinstance(v, UserSelectDefaultValueResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserSelectDefaultValueResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in MentionableSelectComponentResponseDefaultValuesInner with oneOf schemas: RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MentionableSelectComponentResponseDefaultValuesInner with oneOf schemas: RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RoleSelectDefaultValueResponse + try: + instance.actual_instance = RoleSelectDefaultValueResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserSelectDefaultValueResponse + try: + instance.actual_instance = UserSelectDefaultValueResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into MentionableSelectComponentResponseDefaultValuesInner with oneOf schemas: RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MentionableSelectComponentResponseDefaultValuesInner with oneOf schemas: RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RoleSelectDefaultValueResponse, UserSelectDefaultValueResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/message_allowed_mentions_request.py b/dc_rest/models/message_allowed_mentions_request.py new file mode 100644 index 0000000..7f63bc1 --- /dev/null +++ b/dc_rest/models/message_allowed_mentions_request.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageAllowedMentionsRequest(BaseModel): + """ + MessageAllowedMentionsRequest + """ # noqa: E501 + parse: Optional[Annotated[List[StrictStr], Field(max_length=1521)]] = None + users: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=100)]] = None + roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=100)]] = None + replied_user: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["parse", "users", "roles", "replied_user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageAllowedMentionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if parse (nullable) is None + # and model_fields_set contains the field + if self.parse is None and "parse" in self.model_fields_set: + _dict['parse'] = None + + # set to None if users (nullable) is None + # and model_fields_set contains the field + if self.users is None and "users" in self.model_fields_set: + _dict['users'] = None + + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + # set to None if replied_user (nullable) is None + # and model_fields_set contains the field + if self.replied_user is None and "replied_user" in self.model_fields_set: + _dict['replied_user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageAllowedMentionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageAllowedMentionsRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "parse": obj.get("parse"), + "users": obj.get("users"), + "roles": obj.get("roles"), + "replied_user": obj.get("replied_user") + }) + return _obj + + diff --git a/dc_rest/models/message_attachment_request.py b/dc_rest/models/message_attachment_request.py new file mode 100644 index 0000000..04a99cc --- /dev/null +++ b/dc_rest/models/message_attachment_request.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageAttachmentRequest(BaseModel): + """ + MessageAttachmentRequest + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + filename: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None + duration_secs: Optional[Union[Annotated[float, Field(le=2147483647, strict=True, ge=0)], Annotated[int, Field(le=2147483647, strict=True, ge=0)]]] = None + waveform: Optional[Annotated[str, Field(strict=True, max_length=400)]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None + is_remix: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "filename", "description", "duration_secs", "waveform", "title", "is_remix"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageAttachmentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if duration_secs (nullable) is None + # and model_fields_set contains the field + if self.duration_secs is None and "duration_secs" in self.model_fields_set: + _dict['duration_secs'] = None + + # set to None if waveform (nullable) is None + # and model_fields_set contains the field + if self.waveform is None and "waveform" in self.model_fields_set: + _dict['waveform'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if is_remix (nullable) is None + # and model_fields_set contains the field + if self.is_remix is None and "is_remix" in self.model_fields_set: + _dict['is_remix'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageAttachmentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageAttachmentRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "filename": obj.get("filename"), + "description": obj.get("description"), + "duration_secs": obj.get("duration_secs"), + "waveform": obj.get("waveform"), + "title": obj.get("title"), + "is_remix": obj.get("is_remix") + }) + return _obj + + diff --git a/dc_rest/models/message_attachment_response.py b/dc_rest/models/message_attachment_response.py new file mode 100644 index 0000000..100ce21 --- /dev/null +++ b/dc_rest/models/message_attachment_response.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dc_rest.models.application_response import ApplicationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageAttachmentResponse(BaseModel): + """ + MessageAttachmentResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + filename: StrictStr + size: StrictInt + url: StrictStr + proxy_url: StrictStr + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + duration_secs: Optional[Union[StrictFloat, StrictInt]] = None + waveform: Optional[StrictStr] = None + description: Optional[StrictStr] = None + content_type: Optional[StrictStr] = None + ephemeral: Optional[StrictBool] = None + title: Optional[StrictStr] = None + application: Optional[ApplicationResponse] = None + clip_created_at: Optional[datetime] = None + clip_participants: Optional[List[UserResponse]] = None + __properties: ClassVar[List[str]] = ["id", "filename", "size", "url", "proxy_url", "width", "height", "duration_secs", "waveform", "description", "content_type", "ephemeral", "title", "application", "clip_created_at", "clip_participants"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageAttachmentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in clip_participants (list) + _items = [] + if self.clip_participants: + for _item_clip_participants in self.clip_participants: + if _item_clip_participants: + _items.append(_item_clip_participants.to_dict()) + _dict['clip_participants'] = _items + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if duration_secs (nullable) is None + # and model_fields_set contains the field + if self.duration_secs is None and "duration_secs" in self.model_fields_set: + _dict['duration_secs'] = None + + # set to None if waveform (nullable) is None + # and model_fields_set contains the field + if self.waveform is None and "waveform" in self.model_fields_set: + _dict['waveform'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if ephemeral (nullable) is None + # and model_fields_set contains the field + if self.ephemeral is None and "ephemeral" in self.model_fields_set: + _dict['ephemeral'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if application (nullable) is None + # and model_fields_set contains the field + if self.application is None and "application" in self.model_fields_set: + _dict['application'] = None + + # set to None if clip_created_at (nullable) is None + # and model_fields_set contains the field + if self.clip_created_at is None and "clip_created_at" in self.model_fields_set: + _dict['clip_created_at'] = None + + # set to None if clip_participants (nullable) is None + # and model_fields_set contains the field + if self.clip_participants is None and "clip_participants" in self.model_fields_set: + _dict['clip_participants'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageAttachmentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageAttachmentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "filename": obj.get("filename"), + "size": obj.get("size"), + "url": obj.get("url"), + "proxy_url": obj.get("proxy_url"), + "width": obj.get("width"), + "height": obj.get("height"), + "duration_secs": obj.get("duration_secs"), + "waveform": obj.get("waveform"), + "description": obj.get("description"), + "content_type": obj.get("content_type"), + "ephemeral": obj.get("ephemeral"), + "title": obj.get("title"), + "application": ApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "clip_created_at": obj.get("clip_created_at"), + "clip_participants": [UserResponse.from_dict(_item) for _item in obj["clip_participants"]] if obj.get("clip_participants") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/message_call_response.py b/dc_rest/models/message_call_response.py new file mode 100644 index 0000000..856bd9a --- /dev/null +++ b/dc_rest/models/message_call_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageCallResponse(BaseModel): + """ + MessageCallResponse + """ # noqa: E501 + ended_timestamp: Optional[datetime] = None + participants: List[Annotated[str, Field(strict=True)]] + __properties: ClassVar[List[str]] = ["ended_timestamp", "participants"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageCallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if ended_timestamp (nullable) is None + # and model_fields_set contains the field + if self.ended_timestamp is None and "ended_timestamp" in self.model_fields_set: + _dict['ended_timestamp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageCallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageCallResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "ended_timestamp": obj.get("ended_timestamp"), + "participants": obj.get("participants") + }) + return _obj + + diff --git a/dc_rest/models/message_component_interaction_metadata_response.py b/dc_rest/models/message_component_interaction_metadata_response.py new file mode 100644 index 0000000..d5e33aa --- /dev/null +++ b/dc_rest/models/message_component_interaction_metadata_response.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageComponentInteractionMetadataResponse(BaseModel): + """ + MessageComponentInteractionMetadataResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + user: Optional[UserResponse] = None + authorizing_integration_owners: Dict[str, Annotated[str, Field(strict=True)]] + original_response_message_id: Optional[Annotated[str, Field(strict=True)]] = None + interacted_message_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "type", "user", "authorizing_integration_owners", "original_response_message_id", "interacted_message_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('original_response_message_id') + def original_response_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('interacted_message_id') + def interacted_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageComponentInteractionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageComponentInteractionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageComponentInteractionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "authorizing_integration_owners": obj.get("authorizing_integration_owners"), + "original_response_message_id": obj.get("original_response_message_id"), + "interacted_message_id": obj.get("interacted_message_id") + }) + return _obj + + diff --git a/dc_rest/models/message_create_request.py b/dc_rest/models/message_create_request.py new file mode 100644 index 0000000..fbc5de3 --- /dev/null +++ b/dc_rest/models/message_create_request.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.message_reference_request import MessageReferenceRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class MessageCreateRequest(BaseModel): + """ + MessageCreateRequest + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + sticker_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + flags: Optional[StrictInt] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + confetti_potion: Optional[Dict[str, Any]] = None + message_reference: Optional[MessageReferenceRequest] = None + nonce: Optional[BasicMessageResponseNonce] = None + enforce_nonce: Optional[StrictBool] = None + tts: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "sticker_ids", "components", "flags", "attachments", "poll", "confetti_potion", "message_reference", "nonce", "enforce_nonce", "tts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # override the default output from pydantic by calling `to_dict()` of message_reference + if self.message_reference: + _dict['message_reference'] = self.message_reference.to_dict() + # override the default output from pydantic by calling `to_dict()` of nonce + if self.nonce: + _dict['nonce'] = self.nonce.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if sticker_ids (nullable) is None + # and model_fields_set contains the field + if self.sticker_ids is None and "sticker_ids" in self.model_fields_set: + _dict['sticker_ids'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if message_reference (nullable) is None + # and model_fields_set contains the field + if self.message_reference is None and "message_reference" in self.model_fields_set: + _dict['message_reference'] = None + + # set to None if nonce (nullable) is None + # and model_fields_set contains the field + if self.nonce is None and "nonce" in self.model_fields_set: + _dict['nonce'] = None + + # set to None if enforce_nonce (nullable) is None + # and model_fields_set contains the field + if self.enforce_nonce is None and "enforce_nonce" in self.model_fields_set: + _dict['enforce_nonce'] = None + + # set to None if tts (nullable) is None + # and model_fields_set contains the field + if self.tts is None and "tts" in self.model_fields_set: + _dict['tts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "sticker_ids": obj.get("sticker_ids"), + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "flags": obj.get("flags"), + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "confetti_potion": obj.get("confetti_potion"), + "message_reference": MessageReferenceRequest.from_dict(obj["message_reference"]) if obj.get("message_reference") is not None else None, + "nonce": BasicMessageResponseNonce.from_dict(obj["nonce"]) if obj.get("nonce") is not None else None, + "enforce_nonce": obj.get("enforce_nonce"), + "tts": obj.get("tts") + }) + return _obj + + diff --git a/dc_rest/models/message_edit_request_partial.py b/dc_rest/models/message_edit_request_partial.py new file mode 100644 index 0000000..03d0395 --- /dev/null +++ b/dc_rest/models/message_edit_request_partial.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class MessageEditRequestPartial(BaseModel): + """ + MessageEditRequestPartial + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + flags: Optional[StrictInt] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + sticker_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "flags", "allowed_mentions", "sticker_ids", "components", "attachments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEditRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if sticker_ids (nullable) is None + # and model_fields_set contains the field + if self.sticker_ids is None and "sticker_ids" in self.model_fields_set: + _dict['sticker_ids'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEditRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEditRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "flags": obj.get("flags"), + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "sticker_ids": obj.get("sticker_ids"), + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/message_embed_author_response.py b/dc_rest/models/message_embed_author_response.py new file mode 100644 index 0000000..2258b53 --- /dev/null +++ b/dc_rest/models/message_embed_author_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedAuthorResponse(BaseModel): + """ + MessageEmbedAuthorResponse + """ # noqa: E501 + name: StrictStr + url: Optional[StrictStr] = None + icon_url: Optional[StrictStr] = None + proxy_icon_url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "url", "icon_url", "proxy_icon_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedAuthorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if icon_url (nullable) is None + # and model_fields_set contains the field + if self.icon_url is None and "icon_url" in self.model_fields_set: + _dict['icon_url'] = None + + # set to None if proxy_icon_url (nullable) is None + # and model_fields_set contains the field + if self.proxy_icon_url is None and "proxy_icon_url" in self.model_fields_set: + _dict['proxy_icon_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedAuthorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedAuthorResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url"), + "icon_url": obj.get("icon_url"), + "proxy_icon_url": obj.get("proxy_icon_url") + }) + return _obj + + diff --git a/dc_rest/models/message_embed_field_response.py b/dc_rest/models/message_embed_field_response.py new file mode 100644 index 0000000..749ba6d --- /dev/null +++ b/dc_rest/models/message_embed_field_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedFieldResponse(BaseModel): + """ + MessageEmbedFieldResponse + """ # noqa: E501 + name: StrictStr + value: StrictStr + inline: StrictBool + __properties: ClassVar[List[str]] = ["name", "value", "inline"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedFieldResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedFieldResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedFieldResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value"), + "inline": obj.get("inline") + }) + return _obj + + diff --git a/dc_rest/models/message_embed_footer_response.py b/dc_rest/models/message_embed_footer_response.py new file mode 100644 index 0000000..0f49c0c --- /dev/null +++ b/dc_rest/models/message_embed_footer_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedFooterResponse(BaseModel): + """ + MessageEmbedFooterResponse + """ # noqa: E501 + text: StrictStr + icon_url: Optional[StrictStr] = None + proxy_icon_url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["text", "icon_url", "proxy_icon_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedFooterResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon_url (nullable) is None + # and model_fields_set contains the field + if self.icon_url is None and "icon_url" in self.model_fields_set: + _dict['icon_url'] = None + + # set to None if proxy_icon_url (nullable) is None + # and model_fields_set contains the field + if self.proxy_icon_url is None and "proxy_icon_url" in self.model_fields_set: + _dict['proxy_icon_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedFooterResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedFooterResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "icon_url": obj.get("icon_url"), + "proxy_icon_url": obj.get("proxy_icon_url") + }) + return _obj + + diff --git a/dc_rest/models/message_embed_image_response.py b/dc_rest/models/message_embed_image_response.py new file mode 100644 index 0000000..24f6714 --- /dev/null +++ b/dc_rest/models/message_embed_image_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedImageResponse(BaseModel): + """ + MessageEmbedImageResponse + """ # noqa: E501 + url: Optional[StrictStr] = None + proxy_url: Optional[StrictStr] = None + width: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + height: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + content_type: Optional[StrictStr] = None + placeholder: Optional[StrictStr] = None + placeholder_version: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + description: Optional[StrictStr] = None + flags: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["url", "proxy_url", "width", "height", "content_type", "placeholder", "placeholder_version", "description", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedImageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if proxy_url (nullable) is None + # and model_fields_set contains the field + if self.proxy_url is None and "proxy_url" in self.model_fields_set: + _dict['proxy_url'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedImageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedImageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "proxy_url": obj.get("proxy_url"), + "width": obj.get("width"), + "height": obj.get("height"), + "content_type": obj.get("content_type"), + "placeholder": obj.get("placeholder"), + "placeholder_version": obj.get("placeholder_version"), + "description": obj.get("description"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/message_embed_provider_response.py b/dc_rest/models/message_embed_provider_response.py new file mode 100644 index 0000000..e209beb --- /dev/null +++ b/dc_rest/models/message_embed_provider_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedProviderResponse(BaseModel): + """ + MessageEmbedProviderResponse + """ # noqa: E501 + name: StrictStr + url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedProviderResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/message_embed_response.py b/dc_rest/models/message_embed_response.py new file mode 100644 index 0000000..8e5205f --- /dev/null +++ b/dc_rest/models/message_embed_response.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse +from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse +from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse +from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse +from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse +from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedResponse(BaseModel): + """ + MessageEmbedResponse + """ # noqa: E501 + type: StrictStr + url: Optional[StrictStr] = None + title: Optional[StrictStr] = None + description: Optional[StrictStr] = None + color: Optional[StrictInt] = None + timestamp: Optional[datetime] = None + fields: Optional[List[MessageEmbedFieldResponse]] = None + author: Optional[MessageEmbedAuthorResponse] = None + provider: Optional[MessageEmbedProviderResponse] = None + image: Optional[MessageEmbedImageResponse] = None + thumbnail: Optional[MessageEmbedImageResponse] = None + video: Optional[MessageEmbedVideoResponse] = None + footer: Optional[MessageEmbedFooterResponse] = None + __properties: ClassVar[List[str]] = ["type", "url", "title", "description", "color", "timestamp", "fields", "author", "provider", "image", "thumbnail", "video", "footer"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + # override the default output from pydantic by calling `to_dict()` of provider + if self.provider: + _dict['provider'] = self.provider.to_dict() + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + # override the default output from pydantic by calling `to_dict()` of thumbnail + if self.thumbnail: + _dict['thumbnail'] = self.thumbnail.to_dict() + # override the default output from pydantic by calling `to_dict()` of video + if self.video: + _dict['video'] = self.video.to_dict() + # override the default output from pydantic by calling `to_dict()` of footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if timestamp (nullable) is None + # and model_fields_set contains the field + if self.timestamp is None and "timestamp" in self.model_fields_set: + _dict['timestamp'] = None + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict['fields'] = None + + # set to None if author (nullable) is None + # and model_fields_set contains the field + if self.author is None and "author" in self.model_fields_set: + _dict['author'] = None + + # set to None if provider (nullable) is None + # and model_fields_set contains the field + if self.provider is None and "provider" in self.model_fields_set: + _dict['provider'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if thumbnail (nullable) is None + # and model_fields_set contains the field + if self.thumbnail is None and "thumbnail" in self.model_fields_set: + _dict['thumbnail'] = None + + # set to None if video (nullable) is None + # and model_fields_set contains the field + if self.video is None and "video" in self.model_fields_set: + _dict['video'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "url": obj.get("url"), + "title": obj.get("title"), + "description": obj.get("description"), + "color": obj.get("color"), + "timestamp": obj.get("timestamp"), + "fields": [MessageEmbedFieldResponse.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None, + "author": MessageEmbedAuthorResponse.from_dict(obj["author"]) if obj.get("author") is not None else None, + "provider": MessageEmbedProviderResponse.from_dict(obj["provider"]) if obj.get("provider") is not None else None, + "image": MessageEmbedImageResponse.from_dict(obj["image"]) if obj.get("image") is not None else None, + "thumbnail": MessageEmbedImageResponse.from_dict(obj["thumbnail"]) if obj.get("thumbnail") is not None else None, + "video": MessageEmbedVideoResponse.from_dict(obj["video"]) if obj.get("video") is not None else None, + "footer": MessageEmbedFooterResponse.from_dict(obj["footer"]) if obj.get("footer") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/message_embed_video_response.py b/dc_rest/models/message_embed_video_response.py new file mode 100644 index 0000000..f53878f --- /dev/null +++ b/dc_rest/models/message_embed_video_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageEmbedVideoResponse(BaseModel): + """ + MessageEmbedVideoResponse + """ # noqa: E501 + url: Optional[StrictStr] = None + proxy_url: Optional[StrictStr] = None + width: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + height: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + content_type: Optional[StrictStr] = None + placeholder: Optional[StrictStr] = None + placeholder_version: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + description: Optional[StrictStr] = None + flags: Optional[Annotated[int, Field(le=4294967295, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["url", "proxy_url", "width", "height", "content_type", "placeholder", "placeholder_version", "description", "flags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageEmbedVideoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if proxy_url (nullable) is None + # and model_fields_set contains the field + if self.proxy_url is None and "proxy_url" in self.model_fields_set: + _dict['proxy_url'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageEmbedVideoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageEmbedVideoResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "proxy_url": obj.get("proxy_url"), + "width": obj.get("width"), + "height": obj.get("height"), + "content_type": obj.get("content_type"), + "placeholder": obj.get("placeholder"), + "placeholder_version": obj.get("placeholder_version"), + "description": obj.get("description"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/message_interaction_response.py b/dc_rest/models/message_interaction_response.py new file mode 100644 index 0000000..620635e --- /dev/null +++ b/dc_rest/models/message_interaction_response.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageInteractionResponse(BaseModel): + """ + MessageInteractionResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + name: StrictStr + user: Optional[UserResponse] = None + name_localized: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "user", "name_localized"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageInteractionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if name_localized (nullable) is None + # and model_fields_set contains the field + if self.name_localized is None and "name_localized" in self.model_fields_set: + _dict['name_localized'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageInteractionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageInteractionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "name_localized": obj.get("name_localized") + }) + return _obj + + diff --git a/dc_rest/models/message_mention_channel_response.py b/dc_rest/models/message_mention_channel_response.py new file mode 100644 index 0000000..a58111b --- /dev/null +++ b/dc_rest/models/message_mention_channel_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageMentionChannelResponse(BaseModel): + """ + MessageMentionChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + type: StrictInt + guild_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "name", "type", "guild_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageMentionChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageMentionChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageMentionChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "guild_id": obj.get("guild_id") + }) + return _obj + + diff --git a/dc_rest/models/message_reaction_count_details_response.py b/dc_rest/models/message_reaction_count_details_response.py new file mode 100644 index 0000000..dc0fbc6 --- /dev/null +++ b/dc_rest/models/message_reaction_count_details_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MessageReactionCountDetailsResponse(BaseModel): + """ + MessageReactionCountDetailsResponse + """ # noqa: E501 + burst: StrictInt + normal: StrictInt + __properties: ClassVar[List[str]] = ["burst", "normal"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageReactionCountDetailsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageReactionCountDetailsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageReactionCountDetailsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "burst": obj.get("burst"), + "normal": obj.get("normal") + }) + return _obj + + diff --git a/dc_rest/models/message_reaction_emoji_response.py b/dc_rest/models/message_reaction_emoji_response.py new file mode 100644 index 0000000..a50b751 --- /dev/null +++ b/dc_rest/models/message_reaction_emoji_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageReactionEmojiResponse(BaseModel): + """ + MessageReactionEmojiResponse + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: Optional[StrictStr] = None + animated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "animated"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageReactionEmojiResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if animated (nullable) is None + # and model_fields_set contains the field + if self.animated is None and "animated" in self.model_fields_set: + _dict['animated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageReactionEmojiResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageReactionEmojiResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "animated": obj.get("animated") + }) + return _obj + + diff --git a/dc_rest/models/message_reaction_response.py b/dc_rest/models/message_reaction_response.py new file mode 100644 index 0000000..8ffcdab --- /dev/null +++ b/dc_rest/models/message_reaction_response.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageReactionResponse(BaseModel): + """ + MessageReactionResponse + """ # noqa: E501 + emoji: MessageReactionEmojiResponse + count: StrictInt + count_details: MessageReactionCountDetailsResponse + burst_colors: List[StrictStr] + me_burst: StrictBool + me: StrictBool + __properties: ClassVar[List[str]] = ["emoji", "count", "count_details", "burst_colors", "me_burst", "me"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageReactionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # override the default output from pydantic by calling `to_dict()` of count_details + if self.count_details: + _dict['count_details'] = self.count_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageReactionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageReactionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "emoji": MessageReactionEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "count": obj.get("count"), + "count_details": MessageReactionCountDetailsResponse.from_dict(obj["count_details"]) if obj.get("count_details") is not None else None, + "burst_colors": obj.get("burst_colors"), + "me_burst": obj.get("me_burst"), + "me": obj.get("me") + }) + return _obj + + diff --git a/dc_rest/models/message_reference_request.py b/dc_rest/models/message_reference_request.py new file mode 100644 index 0000000..405f6cc --- /dev/null +++ b/dc_rest/models/message_reference_request.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageReferenceRequest(BaseModel): + """ + MessageReferenceRequest + """ # noqa: E501 + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + message_id: Annotated[str, Field(strict=True)] + fail_if_not_exists: Optional[StrictBool] = None + type: Optional[Any] = None + __properties: ClassVar[List[str]] = ["guild_id", "channel_id", "message_id", "fail_if_not_exists", "type"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('message_id') + def message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageReferenceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if fail_if_not_exists (nullable) is None + # and model_fields_set contains the field + if self.fail_if_not_exists is None and "fail_if_not_exists" in self.model_fields_set: + _dict['fail_if_not_exists'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageReferenceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageReferenceRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_id": obj.get("guild_id"), + "channel_id": obj.get("channel_id"), + "message_id": obj.get("message_id"), + "fail_if_not_exists": obj.get("fail_if_not_exists"), + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/message_reference_response.py b/dc_rest/models/message_reference_response.py new file mode 100644 index 0000000..725271e --- /dev/null +++ b/dc_rest/models/message_reference_response.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageReferenceResponse(BaseModel): + """ + MessageReferenceResponse + """ # noqa: E501 + type: Optional[Any] = None + channel_id: Annotated[str, Field(strict=True)] + message_id: Optional[Annotated[str, Field(strict=True)]] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["type", "channel_id", "message_id", "guild_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('message_id') + def message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageReferenceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageReferenceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageReferenceResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "channel_id": obj.get("channel_id"), + "message_id": obj.get("message_id"), + "guild_id": obj.get("guild_id") + }) + return _obj + + diff --git a/dc_rest/models/message_response.py b/dc_rest/models/message_response.py new file mode 100644 index 0000000..3caa2e6 --- /dev/null +++ b/dc_rest/models/message_response.py @@ -0,0 +1,452 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.basic_application_response import BasicApplicationResponse +from dc_rest.models.basic_message_response import BasicMessageResponse +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.models.message_attachment_response import MessageAttachmentResponse +from dc_rest.models.message_call_response import MessageCallResponse +from dc_rest.models.message_embed_response import MessageEmbedResponse +from dc_rest.models.message_interaction_response import MessageInteractionResponse +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse +from dc_rest.models.message_reaction_response import MessageReactionResponse +from dc_rest.models.message_reference_response import MessageReferenceResponse +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse +from dc_rest.models.poll_response import PollResponse +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageResponse(BaseModel): + """ + MessageResponse + """ # noqa: E501 + type: StrictInt + content: StrictStr + mentions: List[UserResponse] + mention_roles: List[Annotated[str, Field(strict=True)]] + attachments: List[MessageAttachmentResponse] + embeds: List[MessageEmbedResponse] + timestamp: datetime + edited_timestamp: Optional[datetime] = None + flags: StrictInt + components: List[BasicMessageResponseComponentsInner] + resolved: Optional[ResolvedObjectsResponse] = None + stickers: Optional[List[GetSticker200Response]] = None + sticker_items: Optional[List[MessageStickerItemResponse]] = None + id: Annotated[str, Field(strict=True)] + channel_id: Annotated[str, Field(strict=True)] + author: UserResponse + pinned: StrictBool + mention_everyone: StrictBool + tts: StrictBool + call: Optional[MessageCallResponse] = None + activity: Optional[Dict[str, Any]] = None + application: Optional[BasicApplicationResponse] = None + application_id: Optional[Annotated[str, Field(strict=True)]] = None + interaction: Optional[MessageInteractionResponse] = None + nonce: Optional[BasicMessageResponseNonce] = None + webhook_id: Optional[Annotated[str, Field(strict=True)]] = None + message_reference: Optional[MessageReferenceResponse] = None + thread: Optional[ThreadResponse] = None + mention_channels: Optional[List[Optional[MessageMentionChannelResponse]]] = None + role_subscription_data: Optional[MessageRoleSubscriptionDataResponse] = None + purchase_notification: Optional[PurchaseNotificationResponse] = None + position: Optional[StrictInt] = None + poll: Optional[PollResponse] = None + interaction_metadata: Optional[BasicMessageResponseInteractionMetadata] = None + message_snapshots: Optional[List[MessageSnapshotResponse]] = None + reactions: Optional[List[MessageReactionResponse]] = None + referenced_message: Optional[BasicMessageResponse] = None + __properties: ClassVar[List[str]] = ["type", "content", "mentions", "mention_roles", "attachments", "embeds", "timestamp", "edited_timestamp", "flags", "components", "resolved", "stickers", "sticker_items", "id", "channel_id", "author", "pinned", "mention_everyone", "tts", "call", "activity", "application", "application_id", "interaction", "nonce", "webhook_id", "message_reference", "thread", "mention_channels", "role_subscription_data", "purchase_notification", "position", "poll", "interaction_metadata", "message_snapshots", "reactions", "referenced_message"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('webhook_id') + def webhook_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mentions (list) + _items = [] + if self.mentions: + for _item_mentions in self.mentions: + if _item_mentions: + _items.append(_item_mentions.to_dict()) + _dict['mentions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of resolved + if self.resolved: + _dict['resolved'] = self.resolved.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in sticker_items (list) + _items = [] + if self.sticker_items: + for _item_sticker_items in self.sticker_items: + if _item_sticker_items: + _items.append(_item_sticker_items.to_dict()) + _dict['sticker_items'] = _items + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + # override the default output from pydantic by calling `to_dict()` of call + if self.call: + _dict['call'] = self.call.to_dict() + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of interaction + if self.interaction: + _dict['interaction'] = self.interaction.to_dict() + # override the default output from pydantic by calling `to_dict()` of nonce + if self.nonce: + _dict['nonce'] = self.nonce.to_dict() + # override the default output from pydantic by calling `to_dict()` of message_reference + if self.message_reference: + _dict['message_reference'] = self.message_reference.to_dict() + # override the default output from pydantic by calling `to_dict()` of thread + if self.thread: + _dict['thread'] = self.thread.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in mention_channels (list) + _items = [] + if self.mention_channels: + for _item_mention_channels in self.mention_channels: + if _item_mention_channels: + _items.append(_item_mention_channels.to_dict()) + _dict['mention_channels'] = _items + # override the default output from pydantic by calling `to_dict()` of role_subscription_data + if self.role_subscription_data: + _dict['role_subscription_data'] = self.role_subscription_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of purchase_notification + if self.purchase_notification: + _dict['purchase_notification'] = self.purchase_notification.to_dict() + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # override the default output from pydantic by calling `to_dict()` of interaction_metadata + if self.interaction_metadata: + _dict['interaction_metadata'] = self.interaction_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in message_snapshots (list) + _items = [] + if self.message_snapshots: + for _item_message_snapshots in self.message_snapshots: + if _item_message_snapshots: + _items.append(_item_message_snapshots.to_dict()) + _dict['message_snapshots'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in reactions (list) + _items = [] + if self.reactions: + for _item_reactions in self.reactions: + if _item_reactions: + _items.append(_item_reactions.to_dict()) + _dict['reactions'] = _items + # override the default output from pydantic by calling `to_dict()` of referenced_message + if self.referenced_message: + _dict['referenced_message'] = self.referenced_message.to_dict() + # set to None if edited_timestamp (nullable) is None + # and model_fields_set contains the field + if self.edited_timestamp is None and "edited_timestamp" in self.model_fields_set: + _dict['edited_timestamp'] = None + + # set to None if resolved (nullable) is None + # and model_fields_set contains the field + if self.resolved is None and "resolved" in self.model_fields_set: + _dict['resolved'] = None + + # set to None if stickers (nullable) is None + # and model_fields_set contains the field + if self.stickers is None and "stickers" in self.model_fields_set: + _dict['stickers'] = None + + # set to None if sticker_items (nullable) is None + # and model_fields_set contains the field + if self.sticker_items is None and "sticker_items" in self.model_fields_set: + _dict['sticker_items'] = None + + # set to None if call (nullable) is None + # and model_fields_set contains the field + if self.call is None and "call" in self.model_fields_set: + _dict['call'] = None + + # set to None if application (nullable) is None + # and model_fields_set contains the field + if self.application is None and "application" in self.model_fields_set: + _dict['application'] = None + + # set to None if interaction (nullable) is None + # and model_fields_set contains the field + if self.interaction is None and "interaction" in self.model_fields_set: + _dict['interaction'] = None + + # set to None if nonce (nullable) is None + # and model_fields_set contains the field + if self.nonce is None and "nonce" in self.model_fields_set: + _dict['nonce'] = None + + # set to None if message_reference (nullable) is None + # and model_fields_set contains the field + if self.message_reference is None and "message_reference" in self.model_fields_set: + _dict['message_reference'] = None + + # set to None if thread (nullable) is None + # and model_fields_set contains the field + if self.thread is None and "thread" in self.model_fields_set: + _dict['thread'] = None + + # set to None if mention_channels (nullable) is None + # and model_fields_set contains the field + if self.mention_channels is None and "mention_channels" in self.model_fields_set: + _dict['mention_channels'] = None + + # set to None if role_subscription_data (nullable) is None + # and model_fields_set contains the field + if self.role_subscription_data is None and "role_subscription_data" in self.model_fields_set: + _dict['role_subscription_data'] = None + + # set to None if purchase_notification (nullable) is None + # and model_fields_set contains the field + if self.purchase_notification is None and "purchase_notification" in self.model_fields_set: + _dict['purchase_notification'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if interaction_metadata (nullable) is None + # and model_fields_set contains the field + if self.interaction_metadata is None and "interaction_metadata" in self.model_fields_set: + _dict['interaction_metadata'] = None + + # set to None if message_snapshots (nullable) is None + # and model_fields_set contains the field + if self.message_snapshots is None and "message_snapshots" in self.model_fields_set: + _dict['message_snapshots'] = None + + # set to None if reactions (nullable) is None + # and model_fields_set contains the field + if self.reactions is None and "reactions" in self.model_fields_set: + _dict['reactions'] = None + + # set to None if referenced_message (nullable) is None + # and model_fields_set contains the field + if self.referenced_message is None and "referenced_message" in self.model_fields_set: + _dict['referenced_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "content": obj.get("content"), + "mentions": [UserResponse.from_dict(_item) for _item in obj["mentions"]] if obj.get("mentions") is not None else None, + "mention_roles": obj.get("mention_roles"), + "attachments": [MessageAttachmentResponse.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "embeds": [MessageEmbedResponse.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "timestamp": obj.get("timestamp"), + "edited_timestamp": obj.get("edited_timestamp"), + "flags": obj.get("flags"), + "components": [BasicMessageResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "resolved": ResolvedObjectsResponse.from_dict(obj["resolved"]) if obj.get("resolved") is not None else None, + "stickers": [GetSticker200Response.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None, + "sticker_items": [MessageStickerItemResponse.from_dict(_item) for _item in obj["sticker_items"]] if obj.get("sticker_items") is not None else None, + "id": obj.get("id"), + "channel_id": obj.get("channel_id"), + "author": UserResponse.from_dict(obj["author"]) if obj.get("author") is not None else None, + "pinned": obj.get("pinned"), + "mention_everyone": obj.get("mention_everyone"), + "tts": obj.get("tts"), + "call": MessageCallResponse.from_dict(obj["call"]) if obj.get("call") is not None else None, + "activity": obj.get("activity"), + "application": BasicApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "application_id": obj.get("application_id"), + "interaction": MessageInteractionResponse.from_dict(obj["interaction"]) if obj.get("interaction") is not None else None, + "nonce": BasicMessageResponseNonce.from_dict(obj["nonce"]) if obj.get("nonce") is not None else None, + "webhook_id": obj.get("webhook_id"), + "message_reference": MessageReferenceResponse.from_dict(obj["message_reference"]) if obj.get("message_reference") is not None else None, + "thread": ThreadResponse.from_dict(obj["thread"]) if obj.get("thread") is not None else None, + "mention_channels": [MessageMentionChannelResponse.from_dict(_item) for _item in obj["mention_channels"]] if obj.get("mention_channels") is not None else None, + "role_subscription_data": MessageRoleSubscriptionDataResponse.from_dict(obj["role_subscription_data"]) if obj.get("role_subscription_data") is not None else None, + "purchase_notification": PurchaseNotificationResponse.from_dict(obj["purchase_notification"]) if obj.get("purchase_notification") is not None else None, + "position": obj.get("position"), + "poll": PollResponse.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "interaction_metadata": BasicMessageResponseInteractionMetadata.from_dict(obj["interaction_metadata"]) if obj.get("interaction_metadata") is not None else None, + "message_snapshots": [MessageSnapshotResponse.from_dict(_item) for _item in obj["message_snapshots"]] if obj.get("message_snapshots") is not None else None, + "reactions": [MessageReactionResponse.from_dict(_item) for _item in obj["reactions"]] if obj.get("reactions") is not None else None, + "referenced_message": BasicMessageResponse.from_dict(obj["referenced_message"]) if obj.get("referenced_message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/message_role_subscription_data_response.py b/dc_rest/models/message_role_subscription_data_response.py new file mode 100644 index 0000000..5829d79 --- /dev/null +++ b/dc_rest/models/message_role_subscription_data_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageRoleSubscriptionDataResponse(BaseModel): + """ + MessageRoleSubscriptionDataResponse + """ # noqa: E501 + role_subscription_listing_id: Annotated[str, Field(strict=True)] + tier_name: StrictStr + total_months_subscribed: StrictInt + is_renewal: StrictBool + __properties: ClassVar[List[str]] = ["role_subscription_listing_id", "tier_name", "total_months_subscribed", "is_renewal"] + + @field_validator('role_subscription_listing_id') + def role_subscription_listing_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageRoleSubscriptionDataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageRoleSubscriptionDataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageRoleSubscriptionDataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "role_subscription_listing_id": obj.get("role_subscription_listing_id"), + "tier_name": obj.get("tier_name"), + "total_months_subscribed": obj.get("total_months_subscribed"), + "is_renewal": obj.get("is_renewal") + }) + return _obj + + diff --git a/dc_rest/models/message_snapshot_response.py b/dc_rest/models/message_snapshot_response.py new file mode 100644 index 0000000..1752ffc --- /dev/null +++ b/dc_rest/models/message_snapshot_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class MessageSnapshotResponse(BaseModel): + """ + MessageSnapshotResponse + """ # noqa: E501 + message: Optional[MinimalContentMessageResponse] = None + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageSnapshotResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageSnapshotResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageSnapshotResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "message": MinimalContentMessageResponse.from_dict(obj["message"]) if obj.get("message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/message_sticker_item_response.py b/dc_rest/models/message_sticker_item_response.py new file mode 100644 index 0000000..94e91c4 --- /dev/null +++ b/dc_rest/models/message_sticker_item_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MessageStickerItemResponse(BaseModel): + """ + MessageStickerItemResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + format_type: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["id", "name", "format_type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageStickerItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if format_type (nullable) is None + # and model_fields_set contains the field + if self.format_type is None and "format_type" in self.model_fields_set: + _dict['format_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageStickerItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MessageStickerItemResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "format_type": obj.get("format_type") + }) + return _obj + + diff --git a/dc_rest/models/minimal_content_message_response.py b/dc_rest/models/minimal_content_message_response.py new file mode 100644 index 0000000..c77851f --- /dev/null +++ b/dc_rest/models/minimal_content_message_response.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.models.message_attachment_response import MessageAttachmentResponse +from dc_rest.models.message_embed_response import MessageEmbedResponse +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class MinimalContentMessageResponse(BaseModel): + """ + MinimalContentMessageResponse + """ # noqa: E501 + type: StrictInt + content: StrictStr + mentions: List[UserResponse] + mention_roles: List[Annotated[str, Field(strict=True)]] + attachments: List[MessageAttachmentResponse] + embeds: List[MessageEmbedResponse] + timestamp: datetime + edited_timestamp: Optional[datetime] = None + flags: StrictInt + components: List[BasicMessageResponseComponentsInner] + resolved: Optional[ResolvedObjectsResponse] = None + stickers: Optional[List[GetSticker200Response]] = None + sticker_items: Optional[List[MessageStickerItemResponse]] = None + __properties: ClassVar[List[str]] = ["type", "content", "mentions", "mention_roles", "attachments", "embeds", "timestamp", "edited_timestamp", "flags", "components", "resolved", "stickers", "sticker_items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MinimalContentMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mentions (list) + _items = [] + if self.mentions: + for _item_mentions in self.mentions: + if _item_mentions: + _items.append(_item_mentions.to_dict()) + _dict['mentions'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of resolved + if self.resolved: + _dict['resolved'] = self.resolved.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in sticker_items (list) + _items = [] + if self.sticker_items: + for _item_sticker_items in self.sticker_items: + if _item_sticker_items: + _items.append(_item_sticker_items.to_dict()) + _dict['sticker_items'] = _items + # set to None if edited_timestamp (nullable) is None + # and model_fields_set contains the field + if self.edited_timestamp is None and "edited_timestamp" in self.model_fields_set: + _dict['edited_timestamp'] = None + + # set to None if resolved (nullable) is None + # and model_fields_set contains the field + if self.resolved is None and "resolved" in self.model_fields_set: + _dict['resolved'] = None + + # set to None if stickers (nullable) is None + # and model_fields_set contains the field + if self.stickers is None and "stickers" in self.model_fields_set: + _dict['stickers'] = None + + # set to None if sticker_items (nullable) is None + # and model_fields_set contains the field + if self.sticker_items is None and "sticker_items" in self.model_fields_set: + _dict['sticker_items'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MinimalContentMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MinimalContentMessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "content": obj.get("content"), + "mentions": [UserResponse.from_dict(_item) for _item in obj["mentions"]] if obj.get("mentions") is not None else None, + "mention_roles": obj.get("mention_roles"), + "attachments": [MessageAttachmentResponse.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "embeds": [MessageEmbedResponse.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "timestamp": obj.get("timestamp"), + "edited_timestamp": obj.get("edited_timestamp"), + "flags": obj.get("flags"), + "components": [BasicMessageResponseComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "resolved": ResolvedObjectsResponse.from_dict(obj["resolved"]) if obj.get("resolved") is not None else None, + "stickers": [GetSticker200Response.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None, + "sticker_items": [MessageStickerItemResponse.from_dict(_item) for _item in obj["sticker_items"]] if obj.get("sticker_items") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/ml_spam_rule_response.py b/dc_rest/models/ml_spam_rule_response.py new file mode 100644 index 0000000..07c00c3 --- /dev/null +++ b/dc_rest/models/ml_spam_rule_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class MLSpamRuleResponse(BaseModel): + """ + MLSpamRuleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + creator_id: Annotated[str, Field(strict=True)] + name: StrictStr + event_type: StrictInt + actions: List[DefaultKeywordRuleResponseActionsInner] + trigger_type: StrictInt + enabled: Optional[StrictBool] = None + exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None + exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None + trigger_metadata: Dict[str, Any] + __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MLSpamRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MLSpamRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MLSpamRuleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "creator_id": obj.get("creator_id"), + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "trigger_type": obj.get("trigger_type"), + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_metadata": obj.get("trigger_metadata") + }) + return _obj + + diff --git a/dc_rest/models/ml_spam_upsert_request.py b/dc_rest/models/ml_spam_upsert_request.py new file mode 100644 index 0000000..7b8d3e3 --- /dev/null +++ b/dc_rest/models/ml_spam_upsert_request.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class MLSpamUpsertRequest(BaseModel): + """ + MLSpamUpsertRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + event_type: StrictInt + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: StrictInt + trigger_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MLSpamUpsertRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MLSpamUpsertRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MLSpamUpsertRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": obj.get("trigger_metadata") + }) + return _obj + + diff --git a/dc_rest/models/ml_spam_upsert_request_partial.py b/dc_rest/models/ml_spam_upsert_request_partial.py new file mode 100644 index 0000000..ccdd645 --- /dev/null +++ b/dc_rest/models/ml_spam_upsert_request_partial.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class MLSpamUpsertRequestPartial(BaseModel): + """ + MLSpamUpsertRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + event_type: Optional[StrictInt] = None + actions: Optional[Annotated[List[DefaultKeywordListUpsertRequestActionsInner], Field(min_length=1, max_length=5)]] = None + enabled: Optional[StrictBool] = None + exempt_roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + exempt_channels: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + trigger_type: Optional[StrictInt] = None + trigger_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["name", "event_type", "actions", "enabled", "exempt_roles", "exempt_channels", "trigger_type", "trigger_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MLSpamUpsertRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # set to None if actions (nullable) is None + # and model_fields_set contains the field + if self.actions is None and "actions" in self.model_fields_set: + _dict['actions'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MLSpamUpsertRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MLSpamUpsertRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordListUpsertRequestActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_type": obj.get("trigger_type"), + "trigger_metadata": obj.get("trigger_metadata") + }) + return _obj + + diff --git a/dc_rest/models/modal_interaction_callback_request.py b/dc_rest/models/modal_interaction_callback_request.py new file mode 100644 index 0000000..f5d283f --- /dev/null +++ b/dc_rest/models/modal_interaction_callback_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData +from typing import Optional, Set +from typing_extensions import Self + +class ModalInteractionCallbackRequest(BaseModel): + """ + ModalInteractionCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + data: ModalInteractionCallbackRequestData + __properties: ClassVar[List[str]] = ["type", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModalInteractionCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModalInteractionCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ModalInteractionCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "data": ModalInteractionCallbackRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/modal_interaction_callback_request_data.py b/dc_rest/models/modal_interaction_callback_request_data.py new file mode 100644 index 0000000..034c7e4 --- /dev/null +++ b/dc_rest/models/modal_interaction_callback_request_data.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest +from typing import Optional, Set +from typing_extensions import Self + +class ModalInteractionCallbackRequestData(BaseModel): + """ + ModalInteractionCallbackRequestData + """ # noqa: E501 + custom_id: Annotated[str, Field(strict=True, max_length=100)] + title: Annotated[str, Field(strict=True, max_length=45)] + components: Annotated[List[ActionRowComponentForModalRequest], Field(min_length=1, max_length=40)] + __properties: ClassVar[List[str]] = ["custom_id", "title", "components"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModalInteractionCallbackRequestData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModalInteractionCallbackRequestData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ModalInteractionCallbackRequestData) in the input: " + _key) + + _obj = cls.model_validate({ + "custom_id": obj.get("custom_id"), + "title": obj.get("title"), + "components": [ActionRowComponentForModalRequest.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/modal_submit_interaction_metadata_response.py b/dc_rest/models/modal_submit_interaction_metadata_response.py new file mode 100644 index 0000000..d44a066 --- /dev/null +++ b/dc_rest/models/modal_submit_interaction_metadata_response.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ModalSubmitInteractionMetadataResponse(BaseModel): + """ + ModalSubmitInteractionMetadataResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + user: Optional[UserResponse] = None + authorizing_integration_owners: Dict[str, Annotated[str, Field(strict=True)]] + original_response_message_id: Optional[Annotated[str, Field(strict=True)]] = None + triggering_interaction_metadata: ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + __properties: ClassVar[List[str]] = ["id", "type", "user", "authorizing_integration_owners", "original_response_message_id", "triggering_interaction_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('original_response_message_id') + def original_response_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModalSubmitInteractionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of triggering_interaction_metadata + if self.triggering_interaction_metadata: + _dict['triggering_interaction_metadata'] = self.triggering_interaction_metadata.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModalSubmitInteractionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ModalSubmitInteractionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "authorizing_integration_owners": obj.get("authorizing_integration_owners"), + "original_response_message_id": obj.get("original_response_message_id"), + "triggering_interaction_metadata": ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.from_dict(obj["triggering_interaction_metadata"]) if obj.get("triggering_interaction_metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.py b/dc_rest/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.py new file mode 100644 index 0000000..9532c22 --- /dev/null +++ b/dc_rest/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MODALSUBMITINTERACTIONMETADATARESPONSETRIGGERINGINTERACTIONMETADATA_ONE_OF_SCHEMAS = ["ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse"] + +class ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata(BaseModel): + """ + ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + """ + # data type: ApplicationCommandInteractionMetadataResponse + oneof_schema_1_validator: Optional[ApplicationCommandInteractionMetadataResponse] = None + # data type: MessageComponentInteractionMetadataResponse + oneof_schema_2_validator: Optional[MessageComponentInteractionMetadataResponse] = None + actual_instance: Optional[Union[ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse]] = None + one_of_schemas: Set[str] = { "ApplicationCommandInteractionMetadataResponse", "MessageComponentInteractionMetadataResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.model_construct() + error_messages = [] + match = 0 + # validate data type: ApplicationCommandInteractionMetadataResponse + if not isinstance(v, ApplicationCommandInteractionMetadataResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationCommandInteractionMetadataResponse`") + else: + match += 1 + # validate data type: MessageComponentInteractionMetadataResponse + if not isinstance(v, MessageComponentInteractionMetadataResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `MessageComponentInteractionMetadataResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ApplicationCommandInteractionMetadataResponse + try: + instance.actual_instance = ApplicationCommandInteractionMetadataResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MessageComponentInteractionMetadataResponse + try: + instance.actual_instance = MessageComponentInteractionMetadataResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata with oneOf schemas: ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationCommandInteractionMetadataResponse, MessageComponentInteractionMetadataResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/my_guild_response.py b/dc_rest/models/my_guild_response.py new file mode 100644 index 0000000..2f8252c --- /dev/null +++ b/dc_rest/models/my_guild_response.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class MyGuildResponse(BaseModel): + """ + MyGuildResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + banner: Optional[StrictStr] = None + owner: StrictBool + permissions: StrictStr + features: List[StrictStr] + approximate_member_count: Optional[StrictInt] = None + approximate_presence_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "banner", "owner", "permissions", "features", "approximate_member_count", "approximate_presence_count"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MyGuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if approximate_member_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_member_count is None and "approximate_member_count" in self.model_fields_set: + _dict['approximate_member_count'] = None + + # set to None if approximate_presence_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_presence_count is None and "approximate_presence_count" in self.model_fields_set: + _dict['approximate_presence_count'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MyGuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in MyGuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "banner": obj.get("banner"), + "owner": obj.get("owner"), + "permissions": obj.get("permissions"), + "features": obj.get("features"), + "approximate_member_count": obj.get("approximate_member_count"), + "approximate_presence_count": obj.get("approximate_presence_count") + }) + return _obj + + diff --git a/dc_rest/models/new_member_action_response.py b/dc_rest/models/new_member_action_response.py new file mode 100644 index 0000000..f84a1d9 --- /dev/null +++ b/dc_rest/models/new_member_action_response.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class NewMemberActionResponse(BaseModel): + """ + NewMemberActionResponse + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + action_type: Optional[StrictInt] + title: StrictStr + description: StrictStr + emoji: Optional[SettingsEmojiResponse] = None + icon: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["channel_id", "action_type", "title", "description", "emoji", "icon"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NewMemberActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if action_type (nullable) is None + # and model_fields_set contains the field + if self.action_type is None and "action_type" in self.model_fields_set: + _dict['action_type'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NewMemberActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in NewMemberActionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "action_type": obj.get("action_type"), + "title": obj.get("title"), + "description": obj.get("description"), + "emoji": SettingsEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "icon": obj.get("icon") + }) + return _obj + + diff --git a/dc_rest/models/o_auth2_get_authorization_response.py b/dc_rest/models/o_auth2_get_authorization_response.py new file mode 100644 index 0000000..d5eff87 --- /dev/null +++ b/dc_rest/models/o_auth2_get_authorization_response.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.application_response import ApplicationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2GetAuthorizationResponse(BaseModel): + """ + OAuth2GetAuthorizationResponse + """ # noqa: E501 + application: ApplicationResponse + expires: datetime + scopes: List[StrictStr] + user: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["application", "expires", "scopes", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2GetAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of application + if self.application: + _dict['application'] = self.application.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2GetAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OAuth2GetAuthorizationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "application": ApplicationResponse.from_dict(obj["application"]) if obj.get("application") is not None else None, + "expires": obj.get("expires"), + "scopes": obj.get("scopes"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/o_auth2_get_keys.py b/dc_rest/models/o_auth2_get_keys.py new file mode 100644 index 0000000..d28ac68 --- /dev/null +++ b/dc_rest/models/o_auth2_get_keys.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.o_auth2_key import OAuth2Key +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2GetKeys(BaseModel): + """ + OAuth2GetKeys + """ # noqa: E501 + keys: List[OAuth2Key] + __properties: ClassVar[List[str]] = ["keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2GetKeys from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item_keys in self.keys: + if _item_keys: + _items.append(_item_keys.to_dict()) + _dict['keys'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2GetKeys from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OAuth2GetKeys) in the input: " + _key) + + _obj = cls.model_validate({ + "keys": [OAuth2Key.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/o_auth2_get_open_id_connect_user_info_response.py b/dc_rest/models/o_auth2_get_open_id_connect_user_info_response.py new file mode 100644 index 0000000..caf8e85 --- /dev/null +++ b/dc_rest/models/o_auth2_get_open_id_connect_user_info_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2GetOpenIDConnectUserInfoResponse(BaseModel): + """ + OAuth2GetOpenIDConnectUserInfoResponse + """ # noqa: E501 + sub: StrictStr + email: Optional[StrictStr] = None + email_verified: Optional[StrictBool] = None + preferred_username: Optional[StrictStr] = None + nickname: Optional[StrictStr] = None + picture: Optional[StrictStr] = None + locale: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["sub", "email", "email_verified", "preferred_username", "nickname", "picture", "locale"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2GetOpenIDConnectUserInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if email_verified (nullable) is None + # and model_fields_set contains the field + if self.email_verified is None and "email_verified" in self.model_fields_set: + _dict['email_verified'] = None + + # set to None if preferred_username (nullable) is None + # and model_fields_set contains the field + if self.preferred_username is None and "preferred_username" in self.model_fields_set: + _dict['preferred_username'] = None + + # set to None if nickname (nullable) is None + # and model_fields_set contains the field + if self.nickname is None and "nickname" in self.model_fields_set: + _dict['nickname'] = None + + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + # set to None if locale (nullable) is None + # and model_fields_set contains the field + if self.locale is None and "locale" in self.model_fields_set: + _dict['locale'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2GetOpenIDConnectUserInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OAuth2GetOpenIDConnectUserInfoResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "sub": obj.get("sub"), + "email": obj.get("email"), + "email_verified": obj.get("email_verified"), + "preferred_username": obj.get("preferred_username"), + "nickname": obj.get("nickname"), + "picture": obj.get("picture"), + "locale": obj.get("locale") + }) + return _obj + + diff --git a/dc_rest/models/o_auth2_key.py b/dc_rest/models/o_auth2_key.py new file mode 100644 index 0000000..dd927d8 --- /dev/null +++ b/dc_rest/models/o_auth2_key.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2Key(BaseModel): + """ + OAuth2Key + """ # noqa: E501 + kty: StrictStr + use: StrictStr + kid: StrictStr + n: StrictStr + e: StrictStr + alg: StrictStr + __properties: ClassVar[List[str]] = ["kty", "use", "kid", "n", "e", "alg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2Key from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2Key from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OAuth2Key) in the input: " + _key) + + _obj = cls.model_validate({ + "kty": obj.get("kty"), + "use": obj.get("use"), + "kid": obj.get("kid"), + "n": obj.get("n"), + "e": obj.get("e"), + "alg": obj.get("alg") + }) + return _obj + + diff --git a/dc_rest/models/onboarding_prompt_option_request.py b/dc_rest/models/onboarding_prompt_option_request.py new file mode 100644 index 0000000..16fe644 --- /dev/null +++ b/dc_rest/models/onboarding_prompt_option_request.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingPromptOptionRequest(BaseModel): + """ + OnboardingPromptOptionRequest + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + title: Annotated[str, Field(min_length=1, strict=True, max_length=50)] + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + emoji_animated: Optional[StrictBool] = None + role_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + channel_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=50)]] = None + __properties: ClassVar[List[str]] = ["id", "title", "description", "emoji_id", "emoji_name", "emoji_animated", "role_ids", "channel_ids"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingPromptOptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + # set to None if emoji_animated (nullable) is None + # and model_fields_set contains the field + if self.emoji_animated is None and "emoji_animated" in self.model_fields_set: + _dict['emoji_animated'] = None + + # set to None if role_ids (nullable) is None + # and model_fields_set contains the field + if self.role_ids is None and "role_ids" in self.model_fields_set: + _dict['role_ids'] = None + + # set to None if channel_ids (nullable) is None + # and model_fields_set contains the field + if self.channel_ids is None and "channel_ids" in self.model_fields_set: + _dict['channel_ids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingPromptOptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OnboardingPromptOptionRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "description": obj.get("description"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "emoji_animated": obj.get("emoji_animated"), + "role_ids": obj.get("role_ids"), + "channel_ids": obj.get("channel_ids") + }) + return _obj + + diff --git a/dc_rest/models/onboarding_prompt_option_response.py b/dc_rest/models/onboarding_prompt_option_response.py new file mode 100644 index 0000000..93edb0b --- /dev/null +++ b/dc_rest/models/onboarding_prompt_option_response.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingPromptOptionResponse(BaseModel): + """ + OnboardingPromptOptionResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + title: StrictStr + description: StrictStr + emoji: SettingsEmojiResponse + role_ids: List[Annotated[str, Field(strict=True)]] + channel_ids: List[Annotated[str, Field(strict=True)]] + __properties: ClassVar[List[str]] = ["id", "title", "description", "emoji", "role_ids", "channel_ids"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingPromptOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingPromptOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OnboardingPromptOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "description": obj.get("description"), + "emoji": SettingsEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "role_ids": obj.get("role_ids"), + "channel_ids": obj.get("channel_ids") + }) + return _obj + + diff --git a/dc_rest/models/onboarding_prompt_response.py b/dc_rest/models/onboarding_prompt_response.py new file mode 100644 index 0000000..20b9b22 --- /dev/null +++ b/dc_rest/models/onboarding_prompt_response.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse +from typing import Optional, Set +from typing_extensions import Self + +class OnboardingPromptResponse(BaseModel): + """ + OnboardingPromptResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + title: StrictStr + options: List[OnboardingPromptOptionResponse] + single_select: StrictBool + required: StrictBool + in_onboarding: StrictBool + type: StrictInt + __properties: ClassVar[List[str]] = ["id", "title", "options", "single_select", "required", "in_onboarding", "type"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OnboardingPromptResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OnboardingPromptResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in OnboardingPromptResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "options": [OnboardingPromptOptionResponse.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "single_select": obj.get("single_select"), + "required": obj.get("required"), + "in_onboarding": obj.get("in_onboarding"), + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/partial_discord_integration_response.py b/dc_rest/models/partial_discord_integration_response.py new file mode 100644 index 0000000..5a309ea --- /dev/null +++ b/dc_rest/models/partial_discord_integration_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from typing import Optional, Set +from typing_extensions import Self + +class PartialDiscordIntegrationResponse(BaseModel): + """ + PartialDiscordIntegrationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + application_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "type", "name", "account", "application_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialDiscordIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialDiscordIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PartialDiscordIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, + "application_id": obj.get("application_id") + }) + return _obj + + diff --git a/dc_rest/models/partial_external_connection_integration_response.py b/dc_rest/models/partial_external_connection_integration_response.py new file mode 100644 index 0000000..cff8167 --- /dev/null +++ b/dc_rest/models/partial_external_connection_integration_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from typing import Optional, Set +from typing_extensions import Self + +class PartialExternalConnectionIntegrationResponse(BaseModel): + """ + PartialExternalConnectionIntegrationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "account"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialExternalConnectionIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialExternalConnectionIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PartialExternalConnectionIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/partial_guild_subscription_integration_response.py b/dc_rest/models/partial_guild_subscription_integration_response.py new file mode 100644 index 0000000..ed76aa7 --- /dev/null +++ b/dc_rest/models/partial_guild_subscription_integration_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.account_response import AccountResponse +from typing import Optional, Set +from typing_extensions import Self + +class PartialGuildSubscriptionIntegrationResponse(BaseModel): + """ + PartialGuildSubscriptionIntegrationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] + name: Optional[StrictStr] = None + account: Optional[AccountResponse] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "account"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialGuildSubscriptionIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if account (nullable) is None + # and model_fields_set contains the field + if self.account is None and "account" in self.model_fields_set: + _dict['account'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialGuildSubscriptionIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PartialGuildSubscriptionIntegrationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/partner_sdk_unmerge_provisional_account_request.py b/dc_rest/models/partner_sdk_unmerge_provisional_account_request.py new file mode 100644 index 0000000..2a0acb8 --- /dev/null +++ b/dc_rest/models/partner_sdk_unmerge_provisional_account_request.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PartnerSdkUnmergeProvisionalAccountRequest(BaseModel): + """ + PartnerSdkUnmergeProvisionalAccountRequest + """ # noqa: E501 + client_id: Annotated[str, Field(strict=True)] + client_secret: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None + external_auth_token: Annotated[str, Field(strict=True, max_length=10240)] + external_auth_type: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["client_id", "client_secret", "external_auth_token", "external_auth_type"] + + @field_validator('client_id') + def client_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartnerSdkUnmergeProvisionalAccountRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if client_secret (nullable) is None + # and model_fields_set contains the field + if self.client_secret is None and "client_secret" in self.model_fields_set: + _dict['client_secret'] = None + + # set to None if external_auth_type (nullable) is None + # and model_fields_set contains the field + if self.external_auth_type is None and "external_auth_type" in self.model_fields_set: + _dict['external_auth_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartnerSdkUnmergeProvisionalAccountRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PartnerSdkUnmergeProvisionalAccountRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "client_id": obj.get("client_id"), + "client_secret": obj.get("client_secret"), + "external_auth_token": obj.get("external_auth_token"), + "external_auth_type": obj.get("external_auth_type") + }) + return _obj + + diff --git a/dc_rest/models/pinned_message_response.py b/dc_rest/models/pinned_message_response.py new file mode 100644 index 0000000..84381f1 --- /dev/null +++ b/dc_rest/models/pinned_message_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.message_response import MessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class PinnedMessageResponse(BaseModel): + """ + PinnedMessageResponse + """ # noqa: E501 + pinned_at: datetime + message: MessageResponse + __properties: ClassVar[List[str]] = ["pinned_at", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PinnedMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PinnedMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PinnedMessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "pinned_at": obj.get("pinned_at"), + "message": MessageResponse.from_dict(obj["message"]) if obj.get("message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/pinned_messages_response.py b/dc_rest/models/pinned_messages_response.py new file mode 100644 index 0000000..ffd123c --- /dev/null +++ b/dc_rest/models/pinned_messages_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.pinned_message_response import PinnedMessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class PinnedMessagesResponse(BaseModel): + """ + PinnedMessagesResponse + """ # noqa: E501 + items: Optional[List[PinnedMessageResponse]] = None + has_more: StrictBool + __properties: ClassVar[List[str]] = ["items", "has_more"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PinnedMessagesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if items (nullable) is None + # and model_fields_set contains the field + if self.items is None and "items" in self.model_fields_set: + _dict['items'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PinnedMessagesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PinnedMessagesResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "items": [PinnedMessageResponse.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "has_more": obj.get("has_more") + }) + return _obj + + diff --git a/dc_rest/models/poll_answer_create_request.py b/dc_rest/models/poll_answer_create_request.py new file mode 100644 index 0000000..9717cbf --- /dev/null +++ b/dc_rest/models/poll_answer_create_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.poll_media_create_request import PollMediaCreateRequest +from typing import Optional, Set +from typing_extensions import Self + +class PollAnswerCreateRequest(BaseModel): + """ + PollAnswerCreateRequest + """ # noqa: E501 + poll_media: PollMediaCreateRequest + __properties: ClassVar[List[str]] = ["poll_media"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollAnswerCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of poll_media + if self.poll_media: + _dict['poll_media'] = self.poll_media.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollAnswerCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollAnswerCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "poll_media": PollMediaCreateRequest.from_dict(obj["poll_media"]) if obj.get("poll_media") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_answer_details_response.py b/dc_rest/models/poll_answer_details_response.py new file mode 100644 index 0000000..b22e926 --- /dev/null +++ b/dc_rest/models/poll_answer_details_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class PollAnswerDetailsResponse(BaseModel): + """ + PollAnswerDetailsResponse + """ # noqa: E501 + users: Optional[List[UserResponse]] = None + __properties: ClassVar[List[str]] = ["users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollAnswerDetailsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # set to None if users (nullable) is None + # and model_fields_set contains the field + if self.users is None and "users" in self.model_fields_set: + _dict['users'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollAnswerDetailsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollAnswerDetailsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "users": [UserResponse.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_answer_response.py b/dc_rest/models/poll_answer_response.py new file mode 100644 index 0000000..375f492 --- /dev/null +++ b/dc_rest/models/poll_answer_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.poll_media_response import PollMediaResponse +from typing import Optional, Set +from typing_extensions import Self + +class PollAnswerResponse(BaseModel): + """ + PollAnswerResponse + """ # noqa: E501 + answer_id: StrictInt + poll_media: PollMediaResponse + __properties: ClassVar[List[str]] = ["answer_id", "poll_media"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollAnswerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of poll_media + if self.poll_media: + _dict['poll_media'] = self.poll_media.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollAnswerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollAnswerResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "answer_id": obj.get("answer_id"), + "poll_media": PollMediaResponse.from_dict(obj["poll_media"]) if obj.get("poll_media") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_create_request.py b/dc_rest/models/poll_create_request.py new file mode 100644 index 0000000..85847d0 --- /dev/null +++ b/dc_rest/models/poll_create_request.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest +from dc_rest.models.poll_media import PollMedia +from typing import Optional, Set +from typing_extensions import Self + +class PollCreateRequest(BaseModel): + """ + PollCreateRequest + """ # noqa: E501 + question: PollMedia + answers: Annotated[List[PollAnswerCreateRequest], Field(min_length=1, max_length=10)] + allow_multiselect: Optional[StrictBool] = None + layout_type: Optional[StrictInt] = None + duration: Optional[Annotated[int, Field(le=768, strict=True, ge=1)]] = None + __properties: ClassVar[List[str]] = ["question", "answers", "allow_multiselect", "layout_type", "duration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of question + if self.question: + _dict['question'] = self.question.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in answers (list) + _items = [] + if self.answers: + for _item_answers in self.answers: + if _item_answers: + _items.append(_item_answers.to_dict()) + _dict['answers'] = _items + # set to None if allow_multiselect (nullable) is None + # and model_fields_set contains the field + if self.allow_multiselect is None and "allow_multiselect" in self.model_fields_set: + _dict['allow_multiselect'] = None + + # set to None if duration (nullable) is None + # and model_fields_set contains the field + if self.duration is None and "duration" in self.model_fields_set: + _dict['duration'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "question": PollMedia.from_dict(obj["question"]) if obj.get("question") is not None else None, + "answers": [PollAnswerCreateRequest.from_dict(_item) for _item in obj["answers"]] if obj.get("answers") is not None else None, + "allow_multiselect": obj.get("allow_multiselect"), + "layout_type": obj.get("layout_type"), + "duration": obj.get("duration") + }) + return _obj + + diff --git a/dc_rest/models/poll_emoji.py b/dc_rest/models/poll_emoji.py new file mode 100644 index 0000000..7be3ad8 --- /dev/null +++ b/dc_rest/models/poll_emoji.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PollEmoji(BaseModel): + """ + PollEmoji + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None + animated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "animated"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollEmoji from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if animated (nullable) is None + # and model_fields_set contains the field + if self.animated is None and "animated" in self.model_fields_set: + _dict['animated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollEmoji from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollEmoji) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "animated": obj.get("animated") + }) + return _obj + + diff --git a/dc_rest/models/poll_emoji_create_request.py b/dc_rest/models/poll_emoji_create_request.py new file mode 100644 index 0000000..e99f9df --- /dev/null +++ b/dc_rest/models/poll_emoji_create_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PollEmojiCreateRequest(BaseModel): + """ + PollEmojiCreateRequest + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None + animated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "animated"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollEmojiCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if animated (nullable) is None + # and model_fields_set contains the field + if self.animated is None and "animated" in self.model_fields_set: + _dict['animated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollEmojiCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollEmojiCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "animated": obj.get("animated") + }) + return _obj + + diff --git a/dc_rest/models/poll_media.py b/dc_rest/models/poll_media.py new file mode 100644 index 0000000..d829aab --- /dev/null +++ b/dc_rest/models/poll_media.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.poll_emoji import PollEmoji +from typing import Optional, Set +from typing_extensions import Self + +class PollMedia(BaseModel): + """ + PollMedia + """ # noqa: E501 + text: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = None + emoji: Optional[PollEmoji] = None + __properties: ClassVar[List[str]] = ["text", "emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollMedia from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollMedia from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollMedia) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "emoji": PollEmoji.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_media_create_request.py b/dc_rest/models/poll_media_create_request.py new file mode 100644 index 0000000..15ce58d --- /dev/null +++ b/dc_rest/models/poll_media_create_request.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest +from typing import Optional, Set +from typing_extensions import Self + +class PollMediaCreateRequest(BaseModel): + """ + PollMediaCreateRequest + """ # noqa: E501 + text: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = None + emoji: Optional[PollEmojiCreateRequest] = None + __properties: ClassVar[List[str]] = ["text", "emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollMediaCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollMediaCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollMediaCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "emoji": PollEmojiCreateRequest.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_media_response.py b/dc_rest/models/poll_media_response.py new file mode 100644 index 0000000..83725bf --- /dev/null +++ b/dc_rest/models/poll_media_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class PollMediaResponse(BaseModel): + """ + PollMediaResponse + """ # noqa: E501 + text: Optional[StrictStr] = None + emoji: Optional[MessageReactionEmojiResponse] = None + __properties: ClassVar[List[str]] = ["text", "emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollMediaResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollMediaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollMediaResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "emoji": MessageReactionEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_response.py b/dc_rest/models/poll_response.py new file mode 100644 index 0000000..02c7db2 --- /dev/null +++ b/dc_rest/models/poll_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.poll_answer_response import PollAnswerResponse +from dc_rest.models.poll_media_response import PollMediaResponse +from dc_rest.models.poll_results_response import PollResultsResponse +from typing import Optional, Set +from typing_extensions import Self + +class PollResponse(BaseModel): + """ + PollResponse + """ # noqa: E501 + question: PollMediaResponse + answers: List[PollAnswerResponse] + expiry: datetime + allow_multiselect: StrictBool + layout_type: StrictInt + results: PollResultsResponse + __properties: ClassVar[List[str]] = ["question", "answers", "expiry", "allow_multiselect", "layout_type", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of question + if self.question: + _dict['question'] = self.question.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in answers (list) + _items = [] + if self.answers: + for _item_answers in self.answers: + if _item_answers: + _items.append(_item_answers.to_dict()) + _dict['answers'] = _items + # override the default output from pydantic by calling `to_dict()` of results + if self.results: + _dict['results'] = self.results.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "question": PollMediaResponse.from_dict(obj["question"]) if obj.get("question") is not None else None, + "answers": [PollAnswerResponse.from_dict(_item) for _item in obj["answers"]] if obj.get("answers") is not None else None, + "expiry": obj.get("expiry"), + "allow_multiselect": obj.get("allow_multiselect"), + "layout_type": obj.get("layout_type"), + "results": PollResultsResponse.from_dict(obj["results"]) if obj.get("results") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/poll_results_entry_response.py b/dc_rest/models/poll_results_entry_response.py new file mode 100644 index 0000000..fb7ce32 --- /dev/null +++ b/dc_rest/models/poll_results_entry_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PollResultsEntryResponse(BaseModel): + """ + PollResultsEntryResponse + """ # noqa: E501 + id: StrictInt + count: StrictInt + me_voted: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "count", "me_voted"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollResultsEntryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if me_voted (nullable) is None + # and model_fields_set contains the field + if self.me_voted is None and "me_voted" in self.model_fields_set: + _dict['me_voted'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollResultsEntryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollResultsEntryResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "count": obj.get("count"), + "me_voted": obj.get("me_voted") + }) + return _obj + + diff --git a/dc_rest/models/poll_results_response.py b/dc_rest/models/poll_results_response.py new file mode 100644 index 0000000..2a1535b --- /dev/null +++ b/dc_rest/models/poll_results_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse +from typing import Optional, Set +from typing_extensions import Self + +class PollResultsResponse(BaseModel): + """ + PollResultsResponse + """ # noqa: E501 + answer_counts: Optional[List[PollResultsEntryResponse]] = None + is_finalized: StrictBool + __properties: ClassVar[List[str]] = ["answer_counts", "is_finalized"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PollResultsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in answer_counts (list) + _items = [] + if self.answer_counts: + for _item_answer_counts in self.answer_counts: + if _item_answer_counts: + _items.append(_item_answer_counts.to_dict()) + _dict['answer_counts'] = _items + # set to None if answer_counts (nullable) is None + # and model_fields_set contains the field + if self.answer_counts is None and "answer_counts" in self.model_fields_set: + _dict['answer_counts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PollResultsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PollResultsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "answer_counts": [PollResultsEntryResponse.from_dict(_item) for _item in obj["answer_counts"]] if obj.get("answer_counts") is not None else None, + "is_finalized": obj.get("is_finalized") + }) + return _obj + + diff --git a/dc_rest/models/pong_interaction_callback_request.py b/dc_rest/models/pong_interaction_callback_request.py new file mode 100644 index 0000000..58d4bcd --- /dev/null +++ b/dc_rest/models/pong_interaction_callback_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PongInteractionCallbackRequest(BaseModel): + """ + PongInteractionCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PongInteractionCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PongInteractionCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PongInteractionCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + return _obj + + diff --git a/dc_rest/models/private_application_response.py b/dc_rest/models/private_application_response.py new file mode 100644 index 0000000..2aa0d4d --- /dev/null +++ b/dc_rest/models/private_application_response.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse +from dc_rest.models.team_response import TeamResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class PrivateApplicationResponse(BaseModel): + """ + PrivateApplicationResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + icon: Optional[StrictStr] = None + description: StrictStr + type: Optional[StrictInt] = None + cover_image: Optional[StrictStr] = None + primary_sku_id: Optional[Annotated[str, Field(strict=True)]] = None + bot: Optional[UserResponse] = None + slug: Optional[StrictStr] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + rpc_origins: Optional[List[Optional[StrictStr]]] = None + bot_public: Optional[StrictBool] = None + bot_require_code_grant: Optional[StrictBool] = None + terms_of_service_url: Optional[StrictStr] = None + privacy_policy_url: Optional[StrictStr] = None + custom_install_url: Optional[StrictStr] = None + install_params: Optional[ApplicationOAuth2InstallParamsResponse] = None + integration_types_config: Optional[Dict[str, ApplicationIntegrationTypeConfigurationResponse]] = None + verify_key: StrictStr + flags: StrictInt + max_participants: Optional[StrictInt] = None + tags: Optional[List[StrictStr]] = None + redirect_uris: List[Optional[StrictStr]] + interactions_endpoint_url: Optional[StrictStr] = None + role_connections_verification_url: Optional[StrictStr] = None + owner: UserResponse + approximate_guild_count: Optional[StrictInt] = None + approximate_user_install_count: StrictInt + approximate_user_authorization_count: StrictInt + explicit_content_filter: StrictInt + team: Optional[TeamResponse] = None + __properties: ClassVar[List[str]] = ["id", "name", "icon", "description", "type", "cover_image", "primary_sku_id", "bot", "slug", "guild_id", "rpc_origins", "bot_public", "bot_require_code_grant", "terms_of_service_url", "privacy_policy_url", "custom_install_url", "install_params", "integration_types_config", "verify_key", "flags", "max_participants", "tags", "redirect_uris", "interactions_endpoint_url", "role_connections_verification_url", "owner", "approximate_guild_count", "approximate_user_install_count", "approximate_user_authorization_count", "explicit_content_filter", "team"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('primary_sku_id') + def primary_sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrivateApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bot + if self.bot: + _dict['bot'] = self.bot.to_dict() + # override the default output from pydantic by calling `to_dict()` of install_params + if self.install_params: + _dict['install_params'] = self.install_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in integration_types_config (dict) + _field_dict = {} + if self.integration_types_config: + for _key_integration_types_config in self.integration_types_config: + if self.integration_types_config[_key_integration_types_config]: + _field_dict[_key_integration_types_config] = self.integration_types_config[_key_integration_types_config].to_dict() + _dict['integration_types_config'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of owner + if self.owner: + _dict['owner'] = self.owner.to_dict() + # override the default output from pydantic by calling `to_dict()` of team + if self.team: + _dict['team'] = self.team.to_dict() + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if cover_image (nullable) is None + # and model_fields_set contains the field + if self.cover_image is None and "cover_image" in self.model_fields_set: + _dict['cover_image'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + # set to None if slug (nullable) is None + # and model_fields_set contains the field + if self.slug is None and "slug" in self.model_fields_set: + _dict['slug'] = None + + # set to None if rpc_origins (nullable) is None + # and model_fields_set contains the field + if self.rpc_origins is None and "rpc_origins" in self.model_fields_set: + _dict['rpc_origins'] = None + + # set to None if bot_public (nullable) is None + # and model_fields_set contains the field + if self.bot_public is None and "bot_public" in self.model_fields_set: + _dict['bot_public'] = None + + # set to None if bot_require_code_grant (nullable) is None + # and model_fields_set contains the field + if self.bot_require_code_grant is None and "bot_require_code_grant" in self.model_fields_set: + _dict['bot_require_code_grant'] = None + + # set to None if terms_of_service_url (nullable) is None + # and model_fields_set contains the field + if self.terms_of_service_url is None and "terms_of_service_url" in self.model_fields_set: + _dict['terms_of_service_url'] = None + + # set to None if privacy_policy_url (nullable) is None + # and model_fields_set contains the field + if self.privacy_policy_url is None and "privacy_policy_url" in self.model_fields_set: + _dict['privacy_policy_url'] = None + + # set to None if custom_install_url (nullable) is None + # and model_fields_set contains the field + if self.custom_install_url is None and "custom_install_url" in self.model_fields_set: + _dict['custom_install_url'] = None + + # set to None if install_params (nullable) is None + # and model_fields_set contains the field + if self.install_params is None and "install_params" in self.model_fields_set: + _dict['install_params'] = None + + # set to None if max_participants (nullable) is None + # and model_fields_set contains the field + if self.max_participants is None and "max_participants" in self.model_fields_set: + _dict['max_participants'] = None + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + # set to None if interactions_endpoint_url (nullable) is None + # and model_fields_set contains the field + if self.interactions_endpoint_url is None and "interactions_endpoint_url" in self.model_fields_set: + _dict['interactions_endpoint_url'] = None + + # set to None if role_connections_verification_url (nullable) is None + # and model_fields_set contains the field + if self.role_connections_verification_url is None and "role_connections_verification_url" in self.model_fields_set: + _dict['role_connections_verification_url'] = None + + # set to None if approximate_guild_count (nullable) is None + # and model_fields_set contains the field + if self.approximate_guild_count is None and "approximate_guild_count" in self.model_fields_set: + _dict['approximate_guild_count'] = None + + # set to None if team (nullable) is None + # and model_fields_set contains the field + if self.team is None and "team" in self.model_fields_set: + _dict['team'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrivateApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PrivateApplicationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "icon": obj.get("icon"), + "description": obj.get("description"), + "type": obj.get("type"), + "cover_image": obj.get("cover_image"), + "primary_sku_id": obj.get("primary_sku_id"), + "bot": UserResponse.from_dict(obj["bot"]) if obj.get("bot") is not None else None, + "slug": obj.get("slug"), + "guild_id": obj.get("guild_id"), + "rpc_origins": obj.get("rpc_origins"), + "bot_public": obj.get("bot_public"), + "bot_require_code_grant": obj.get("bot_require_code_grant"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "custom_install_url": obj.get("custom_install_url"), + "install_params": ApplicationOAuth2InstallParamsResponse.from_dict(obj["install_params"]) if obj.get("install_params") is not None else None, + "integration_types_config": dict( + (_k, ApplicationIntegrationTypeConfigurationResponse.from_dict(_v)) + for _k, _v in obj["integration_types_config"].items() + ) + if obj.get("integration_types_config") is not None + else None, + "verify_key": obj.get("verify_key"), + "flags": obj.get("flags"), + "max_participants": obj.get("max_participants"), + "tags": obj.get("tags"), + "redirect_uris": obj.get("redirect_uris"), + "interactions_endpoint_url": obj.get("interactions_endpoint_url"), + "role_connections_verification_url": obj.get("role_connections_verification_url"), + "owner": UserResponse.from_dict(obj["owner"]) if obj.get("owner") is not None else None, + "approximate_guild_count": obj.get("approximate_guild_count"), + "approximate_user_install_count": obj.get("approximate_user_install_count"), + "approximate_user_authorization_count": obj.get("approximate_user_authorization_count"), + "explicit_content_filter": obj.get("explicit_content_filter"), + "team": TeamResponse.from_dict(obj["team"]) if obj.get("team") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/private_channel_location.py b/dc_rest/models/private_channel_location.py new file mode 100644 index 0000000..7b308ca --- /dev/null +++ b/dc_rest/models/private_channel_location.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PrivateChannelLocation(BaseModel): + """ + PrivateChannelLocation + """ # noqa: E501 + id: StrictStr + kind: StrictStr + channel_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "kind", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrivateChannelLocation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrivateChannelLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PrivateChannelLocation) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "kind": obj.get("kind"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/private_channel_response.py b/dc_rest/models/private_channel_response.py new file mode 100644 index 0000000..b0c5114 --- /dev/null +++ b/dc_rest/models/private_channel_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class PrivateChannelResponse(BaseModel): + """ + PrivateChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + last_message_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: StrictInt + last_pin_timestamp: Optional[datetime] = None + recipients: List[UserResponse] + __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "recipients"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('last_message_id') + def last_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrivateChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # set to None if last_pin_timestamp (nullable) is None + # and model_fields_set contains the field + if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set: + _dict['last_pin_timestamp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrivateChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PrivateChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "last_message_id": obj.get("last_message_id"), + "flags": obj.get("flags"), + "last_pin_timestamp": obj.get("last_pin_timestamp"), + "recipients": [UserResponse.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/private_group_channel_response.py b/dc_rest/models/private_group_channel_response.py new file mode 100644 index 0000000..5843898 --- /dev/null +++ b/dc_rest/models/private_group_channel_response.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class PrivateGroupChannelResponse(BaseModel): + """ + PrivateGroupChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + last_message_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: StrictInt + last_pin_timestamp: Optional[datetime] = None + recipients: List[UserResponse] + name: Optional[StrictStr] = None + icon: Optional[StrictStr] = None + owner_id: Optional[Annotated[str, Field(strict=True)]] = None + managed: Optional[StrictBool] = None + application_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "recipients", "name", "icon", "owner_id", "managed", "application_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('last_message_id') + def last_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('application_id') + def application_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrivateGroupChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in recipients (list) + _items = [] + if self.recipients: + for _item_recipients in self.recipients: + if _item_recipients: + _items.append(_item_recipients.to_dict()) + _dict['recipients'] = _items + # set to None if last_pin_timestamp (nullable) is None + # and model_fields_set contains the field + if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set: + _dict['last_pin_timestamp'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if managed (nullable) is None + # and model_fields_set contains the field + if self.managed is None and "managed" in self.model_fields_set: + _dict['managed'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrivateGroupChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PrivateGroupChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "last_message_id": obj.get("last_message_id"), + "flags": obj.get("flags"), + "last_pin_timestamp": obj.get("last_pin_timestamp"), + "recipients": [UserResponse.from_dict(_item) for _item in obj["recipients"]] if obj.get("recipients") is not None else None, + "name": obj.get("name"), + "icon": obj.get("icon"), + "owner_id": obj.get("owner_id"), + "managed": obj.get("managed"), + "application_id": obj.get("application_id") + }) + return _obj + + diff --git a/dc_rest/models/private_guild_member_response.py b/dc_rest/models/private_guild_member_response.py new file mode 100644 index 0000000..995311d --- /dev/null +++ b/dc_rest/models/private_guild_member_response.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class PrivateGuildMemberResponse(BaseModel): + """ + PrivateGuildMemberResponse + """ # noqa: E501 + avatar: Optional[StrictStr] = None + avatar_decoration_data: Optional[UserAvatarDecorationResponse] = None + banner: Optional[StrictStr] = None + communication_disabled_until: Optional[datetime] = None + flags: StrictInt + joined_at: datetime + nick: Optional[StrictStr] = None + pending: StrictBool + premium_since: Optional[datetime] = None + roles: List[Annotated[str, Field(strict=True)]] + user: UserResponse + mute: StrictBool + deaf: StrictBool + __properties: ClassVar[List[str]] = ["avatar", "avatar_decoration_data", "banner", "communication_disabled_until", "flags", "joined_at", "nick", "pending", "premium_since", "roles", "user", "mute", "deaf"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrivateGuildMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of avatar_decoration_data + if self.avatar_decoration_data: + _dict['avatar_decoration_data'] = self.avatar_decoration_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if avatar_decoration_data (nullable) is None + # and model_fields_set contains the field + if self.avatar_decoration_data is None and "avatar_decoration_data" in self.model_fields_set: + _dict['avatar_decoration_data'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if communication_disabled_until (nullable) is None + # and model_fields_set contains the field + if self.communication_disabled_until is None and "communication_disabled_until" in self.model_fields_set: + _dict['communication_disabled_until'] = None + + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + # set to None if premium_since (nullable) is None + # and model_fields_set contains the field + if self.premium_since is None and "premium_since" in self.model_fields_set: + _dict['premium_since'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrivateGuildMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PrivateGuildMemberResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "avatar": obj.get("avatar"), + "avatar_decoration_data": UserAvatarDecorationResponse.from_dict(obj["avatar_decoration_data"]) if obj.get("avatar_decoration_data") is not None else None, + "banner": obj.get("banner"), + "communication_disabled_until": obj.get("communication_disabled_until"), + "flags": obj.get("flags"), + "joined_at": obj.get("joined_at"), + "nick": obj.get("nick"), + "pending": obj.get("pending"), + "premium_since": obj.get("premium_since"), + "roles": obj.get("roles"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "mute": obj.get("mute"), + "deaf": obj.get("deaf") + }) + return _obj + + diff --git a/dc_rest/models/provisional_token_response.py b/dc_rest/models/provisional_token_response.py new file mode 100644 index 0000000..b49dc03 --- /dev/null +++ b/dc_rest/models/provisional_token_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProvisionalTokenResponse(BaseModel): + """ + ProvisionalTokenResponse + """ # noqa: E501 + token_type: StrictStr + access_token: StrictStr + expires_in: StrictInt + scope: StrictStr + id_token: StrictStr + refresh_token: Optional[StrictStr] = None + scopes: Optional[List[StrictStr]] = None + expires_at_s: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["token_type", "access_token", "expires_in", "scope", "id_token", "refresh_token", "scopes", "expires_at_s"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProvisionalTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if refresh_token (nullable) is None + # and model_fields_set contains the field + if self.refresh_token is None and "refresh_token" in self.model_fields_set: + _dict['refresh_token'] = None + + # set to None if scopes (nullable) is None + # and model_fields_set contains the field + if self.scopes is None and "scopes" in self.model_fields_set: + _dict['scopes'] = None + + # set to None if expires_at_s (nullable) is None + # and model_fields_set contains the field + if self.expires_at_s is None and "expires_at_s" in self.model_fields_set: + _dict['expires_at_s'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProvisionalTokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ProvisionalTokenResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "token_type": obj.get("token_type"), + "access_token": obj.get("access_token"), + "expires_in": obj.get("expires_in"), + "scope": obj.get("scope"), + "id_token": obj.get("id_token"), + "refresh_token": obj.get("refresh_token"), + "scopes": obj.get("scopes"), + "expires_at_s": obj.get("expires_at_s") + }) + return _obj + + diff --git a/dc_rest/models/prune_guild_request.py b/dc_rest/models/prune_guild_request.py new file mode 100644 index 0000000..976083d --- /dev/null +++ b/dc_rest/models/prune_guild_request.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles +from typing import Optional, Set +from typing_extensions import Self + +class PruneGuildRequest(BaseModel): + """ + PruneGuildRequest + """ # noqa: E501 + days: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = None + compute_prune_count: Optional[StrictBool] = None + include_roles: Optional[PruneGuildRequestIncludeRoles] = None + __properties: ClassVar[List[str]] = ["days", "compute_prune_count", "include_roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PruneGuildRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of include_roles + if self.include_roles: + _dict['include_roles'] = self.include_roles.to_dict() + # set to None if days (nullable) is None + # and model_fields_set contains the field + if self.days is None and "days" in self.model_fields_set: + _dict['days'] = None + + # set to None if compute_prune_count (nullable) is None + # and model_fields_set contains the field + if self.compute_prune_count is None and "compute_prune_count" in self.model_fields_set: + _dict['compute_prune_count'] = None + + # set to None if include_roles (nullable) is None + # and model_fields_set contains the field + if self.include_roles is None and "include_roles" in self.model_fields_set: + _dict['include_roles'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PruneGuildRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PruneGuildRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "days": obj.get("days"), + "compute_prune_count": obj.get("compute_prune_count"), + "include_roles": PruneGuildRequestIncludeRoles.from_dict(obj["include_roles"]) if obj.get("include_roles") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/prune_guild_request_include_roles.py b/dc_rest/models/prune_guild_request_include_roles.py new file mode 100644 index 0000000..cfe123d --- /dev/null +++ b/dc_rest/models/prune_guild_request_include_roles.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +PRUNEGUILDREQUESTINCLUDEROLES_ONE_OF_SCHEMAS = ["List[Optional[str]]", "str"] + +class PruneGuildRequestIncludeRoles(BaseModel): + """ + PruneGuildRequestIncludeRoles + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: List[Optional[str]] + oneof_schema_2_validator: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=100)]] = None + actual_instance: Optional[Union[List[Optional[str]], str]] = None + one_of_schemas: Set[str] = { "List[Optional[str]]", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = PruneGuildRequestIncludeRoles.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[Optional[str]] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PruneGuildRequestIncludeRoles with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PruneGuildRequestIncludeRoles with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[Optional[str]] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PruneGuildRequestIncludeRoles with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PruneGuildRequestIncludeRoles with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[Optional[str]], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/purchase_notification_response.py b/dc_rest/models/purchase_notification_response.py new file mode 100644 index 0000000..0f615f0 --- /dev/null +++ b/dc_rest/models/purchase_notification_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse +from typing import Optional, Set +from typing_extensions import Self + +class PurchaseNotificationResponse(BaseModel): + """ + PurchaseNotificationResponse + """ # noqa: E501 + type: Optional[StrictInt] + guild_product_purchase: Optional[GuildProductPurchaseResponse] = None + __properties: ClassVar[List[str]] = ["type", "guild_product_purchase"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PurchaseNotificationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of guild_product_purchase + if self.guild_product_purchase: + _dict['guild_product_purchase'] = self.guild_product_purchase.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if guild_product_purchase (nullable) is None + # and model_fields_set contains the field + if self.guild_product_purchase is None and "guild_product_purchase" in self.model_fields_set: + _dict['guild_product_purchase'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PurchaseNotificationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in PurchaseNotificationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "guild_product_purchase": GuildProductPurchaseResponse.from_dict(obj["guild_product_purchase"]) if obj.get("guild_product_purchase") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/quarantine_user_action.py b/dc_rest/models/quarantine_user_action.py new file mode 100644 index 0000000..f0700ab --- /dev/null +++ b/dc_rest/models/quarantine_user_action.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class QuarantineUserAction(BaseModel): + """ + QuarantineUserAction + """ # noqa: E501 + type: StrictInt + metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuarantineUserAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuarantineUserAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in QuarantineUserAction) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/dc_rest/models/quarantine_user_action_response.py b/dc_rest/models/quarantine_user_action_response.py new file mode 100644 index 0000000..8f81bc0 --- /dev/null +++ b/dc_rest/models/quarantine_user_action_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class QuarantineUserActionResponse(BaseModel): + """ + QuarantineUserActionResponse + """ # noqa: E501 + type: StrictInt + metadata: Dict[str, Any] + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuarantineUserActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuarantineUserActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in QuarantineUserActionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/dc_rest/models/resolved_objects_response.py b/dc_rest/models/resolved_objects_response.py new file mode 100644 index 0000000..8be1139 --- /dev/null +++ b/dc_rest/models/resolved_objects_response.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ResolvedObjectsResponse(BaseModel): + """ + ResolvedObjectsResponse + """ # noqa: E501 + users: Dict[str, UserResponse] + members: Dict[str, GuildMemberResponse] + channels: Dict[str, GetChannel200Response] + roles: Dict[str, GuildRoleResponse] + __properties: ClassVar[List[str]] = ["users", "members", "channels", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResolvedObjectsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in users (dict) + _field_dict = {} + if self.users: + for _key_users in self.users: + if self.users[_key_users]: + _field_dict[_key_users] = self.users[_key_users].to_dict() + _dict['users'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in members (dict) + _field_dict = {} + if self.members: + for _key_members in self.members: + if self.members[_key_members]: + _field_dict[_key_members] = self.members[_key_members].to_dict() + _dict['members'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in channels (dict) + _field_dict = {} + if self.channels: + for _key_channels in self.channels: + if self.channels[_key_channels]: + _field_dict[_key_channels] = self.channels[_key_channels].to_dict() + _dict['channels'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in roles (dict) + _field_dict = {} + if self.roles: + for _key_roles in self.roles: + if self.roles[_key_roles]: + _field_dict[_key_roles] = self.roles[_key_roles].to_dict() + _dict['roles'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResolvedObjectsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ResolvedObjectsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "users": dict( + (_k, UserResponse.from_dict(_v)) + for _k, _v in obj["users"].items() + ) + if obj.get("users") is not None + else None, + "members": dict( + (_k, GuildMemberResponse.from_dict(_v)) + for _k, _v in obj["members"].items() + ) + if obj.get("members") is not None + else None, + "channels": dict( + (_k, GetChannel200Response.from_dict(_v)) + for _k, _v in obj["channels"].items() + ) + if obj.get("channels") is not None + else None, + "roles": dict( + (_k, GuildRoleResponse.from_dict(_v)) + for _k, _v in obj["roles"].items() + ) + if obj.get("roles") is not None + else None + }) + return _obj + + diff --git a/dc_rest/models/resource_channel_response.py b/dc_rest/models/resource_channel_response.py new file mode 100644 index 0000000..08b7743 --- /dev/null +++ b/dc_rest/models/resource_channel_response.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class ResourceChannelResponse(BaseModel): + """ + ResourceChannelResponse + """ # noqa: E501 + channel_id: Annotated[str, Field(strict=True)] + title: StrictStr + emoji: Optional[SettingsEmojiResponse] = None + icon: Optional[StrictStr] = None + description: StrictStr + __properties: ClassVar[List[str]] = ["channel_id", "title", "emoji", "icon", "description"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ResourceChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "title": obj.get("title"), + "emoji": SettingsEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "icon": obj.get("icon"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed.py b/dc_rest/models/rich_embed.py new file mode 100644 index 0000000..ef90f73 --- /dev/null +++ b/dc_rest/models/rich_embed.py @@ -0,0 +1,249 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.rich_embed_author import RichEmbedAuthor +from dc_rest.models.rich_embed_field import RichEmbedField +from dc_rest.models.rich_embed_footer import RichEmbedFooter +from dc_rest.models.rich_embed_image import RichEmbedImage +from dc_rest.models.rich_embed_provider import RichEmbedProvider +from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail +from dc_rest.models.rich_embed_video import RichEmbedVideo +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbed(BaseModel): + """ + RichEmbed + """ # noqa: E501 + type: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + title: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + color: Optional[Annotated[int, Field(le=16777215, strict=True, ge=0)]] = None + timestamp: Optional[datetime] = None + description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + author: Optional[RichEmbedAuthor] = None + image: Optional[RichEmbedImage] = None + thumbnail: Optional[RichEmbedThumbnail] = None + footer: Optional[RichEmbedFooter] = None + fields: Optional[Annotated[List[RichEmbedField], Field(max_length=25)]] = None + provider: Optional[RichEmbedProvider] = None + video: Optional[RichEmbedVideo] = None + __properties: ClassVar[List[str]] = ["type", "url", "title", "color", "timestamp", "description", "author", "image", "thumbnail", "footer", "fields", "provider", "video"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbed from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of author + if self.author: + _dict['author'] = self.author.to_dict() + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + # override the default output from pydantic by calling `to_dict()` of thumbnail + if self.thumbnail: + _dict['thumbnail'] = self.thumbnail.to_dict() + # override the default output from pydantic by calling `to_dict()` of footer + if self.footer: + _dict['footer'] = self.footer.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items + # override the default output from pydantic by calling `to_dict()` of provider + if self.provider: + _dict['provider'] = self.provider.to_dict() + # override the default output from pydantic by calling `to_dict()` of video + if self.video: + _dict['video'] = self.video.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if timestamp (nullable) is None + # and model_fields_set contains the field + if self.timestamp is None and "timestamp" in self.model_fields_set: + _dict['timestamp'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if author (nullable) is None + # and model_fields_set contains the field + if self.author is None and "author" in self.model_fields_set: + _dict['author'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if thumbnail (nullable) is None + # and model_fields_set contains the field + if self.thumbnail is None and "thumbnail" in self.model_fields_set: + _dict['thumbnail'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict['fields'] = None + + # set to None if provider (nullable) is None + # and model_fields_set contains the field + if self.provider is None and "provider" in self.model_fields_set: + _dict['provider'] = None + + # set to None if video (nullable) is None + # and model_fields_set contains the field + if self.video is None and "video" in self.model_fields_set: + _dict['video'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbed from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbed) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "url": obj.get("url"), + "title": obj.get("title"), + "color": obj.get("color"), + "timestamp": obj.get("timestamp"), + "description": obj.get("description"), + "author": RichEmbedAuthor.from_dict(obj["author"]) if obj.get("author") is not None else None, + "image": RichEmbedImage.from_dict(obj["image"]) if obj.get("image") is not None else None, + "thumbnail": RichEmbedThumbnail.from_dict(obj["thumbnail"]) if obj.get("thumbnail") is not None else None, + "footer": RichEmbedFooter.from_dict(obj["footer"]) if obj.get("footer") is not None else None, + "fields": [RichEmbedField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None, + "provider": RichEmbedProvider.from_dict(obj["provider"]) if obj.get("provider") is not None else None, + "video": RichEmbedVideo.from_dict(obj["video"]) if obj.get("video") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_author.py b/dc_rest/models/rich_embed_author.py new file mode 100644 index 0000000..081afc6 --- /dev/null +++ b/dc_rest/models/rich_embed_author.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedAuthor(BaseModel): + """ + RichEmbedAuthor + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + icon_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + __properties: ClassVar[List[str]] = ["name", "url", "icon_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedAuthor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if icon_url (nullable) is None + # and model_fields_set contains the field + if self.icon_url is None and "icon_url" in self.model_fields_set: + _dict['icon_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedAuthor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedAuthor) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url"), + "icon_url": obj.get("icon_url") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_field.py b/dc_rest/models/rich_embed_field.py new file mode 100644 index 0000000..ac61f3d --- /dev/null +++ b/dc_rest/models/rich_embed_field.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedField(BaseModel): + """ + RichEmbedField + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=256)] + value: Annotated[str, Field(strict=True, max_length=1024)] + inline: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "value", "inline"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if inline (nullable) is None + # and model_fields_set contains the field + if self.inline is None and "inline" in self.model_fields_set: + _dict['inline'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedField) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value"), + "inline": obj.get("inline") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_footer.py b/dc_rest/models/rich_embed_footer.py new file mode 100644 index 0000000..941bb29 --- /dev/null +++ b/dc_rest/models/rich_embed_footer.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedFooter(BaseModel): + """ + RichEmbedFooter + """ # noqa: E501 + text: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + icon_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + __properties: ClassVar[List[str]] = ["text", "icon_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedFooter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if icon_url (nullable) is None + # and model_fields_set contains the field + if self.icon_url is None and "icon_url" in self.model_fields_set: + _dict['icon_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedFooter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedFooter) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "icon_url": obj.get("icon_url") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_image.py b/dc_rest/models/rich_embed_image.py new file mode 100644 index 0000000..b016a45 --- /dev/null +++ b/dc_rest/models/rich_embed_image.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedImage(BaseModel): + """ + RichEmbedImage + """ # noqa: E501 + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + placeholder: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None + placeholder_version: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=0)]] = None + is_animated: Optional[StrictBool] = None + description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + __properties: ClassVar[List[str]] = ["url", "width", "height", "placeholder", "placeholder_version", "is_animated", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedImage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if placeholder_version (nullable) is None + # and model_fields_set contains the field + if self.placeholder_version is None and "placeholder_version" in self.model_fields_set: + _dict['placeholder_version'] = None + + # set to None if is_animated (nullable) is None + # and model_fields_set contains the field + if self.is_animated is None and "is_animated" in self.model_fields_set: + _dict['is_animated'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedImage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedImage) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "width": obj.get("width"), + "height": obj.get("height"), + "placeholder": obj.get("placeholder"), + "placeholder_version": obj.get("placeholder_version"), + "is_animated": obj.get("is_animated"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_provider.py b/dc_rest/models/rich_embed_provider.py new file mode 100644 index 0000000..91c1374 --- /dev/null +++ b/dc_rest/models/rich_embed_provider.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedProvider(BaseModel): + """ + RichEmbedProvider + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=256)]] = None + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + __properties: ClassVar[List[str]] = ["name", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedProvider) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_thumbnail.py b/dc_rest/models/rich_embed_thumbnail.py new file mode 100644 index 0000000..f213b64 --- /dev/null +++ b/dc_rest/models/rich_embed_thumbnail.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedThumbnail(BaseModel): + """ + RichEmbedThumbnail + """ # noqa: E501 + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + placeholder: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None + placeholder_version: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=0)]] = None + is_animated: Optional[StrictBool] = None + description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + __properties: ClassVar[List[str]] = ["url", "width", "height", "placeholder", "placeholder_version", "is_animated", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedThumbnail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if placeholder_version (nullable) is None + # and model_fields_set contains the field + if self.placeholder_version is None and "placeholder_version" in self.model_fields_set: + _dict['placeholder_version'] = None + + # set to None if is_animated (nullable) is None + # and model_fields_set contains the field + if self.is_animated is None and "is_animated" in self.model_fields_set: + _dict['is_animated'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedThumbnail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedThumbnail) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "width": obj.get("width"), + "height": obj.get("height"), + "placeholder": obj.get("placeholder"), + "placeholder_version": obj.get("placeholder_version"), + "is_animated": obj.get("is_animated"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/rich_embed_video.py b/dc_rest/models/rich_embed_video.py new file mode 100644 index 0000000..e491313 --- /dev/null +++ b/dc_rest/models/rich_embed_video.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RichEmbedVideo(BaseModel): + """ + RichEmbedVideo + """ # noqa: E501 + url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + placeholder: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None + placeholder_version: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=0)]] = None + is_animated: Optional[StrictBool] = None + description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None + __properties: ClassVar[List[str]] = ["url", "width", "height", "placeholder", "placeholder_version", "is_animated", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RichEmbedVideo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if placeholder_version (nullable) is None + # and model_fields_set contains the field + if self.placeholder_version is None and "placeholder_version" in self.model_fields_set: + _dict['placeholder_version'] = None + + # set to None if is_animated (nullable) is None + # and model_fields_set contains the field + if self.is_animated is None and "is_animated" in self.model_fields_set: + _dict['is_animated'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RichEmbedVideo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RichEmbedVideo) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "width": obj.get("width"), + "height": obj.get("height"), + "placeholder": obj.get("placeholder"), + "placeholder_version": obj.get("placeholder_version"), + "is_animated": obj.get("is_animated"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/role_select_component_for_message_request.py b/dc_rest/models/role_select_component_for_message_request.py new file mode 100644 index 0000000..9277adc --- /dev/null +++ b/dc_rest/models/role_select_component_for_message_request.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue +from typing import Optional, Set +from typing_extensions import Self + +class RoleSelectComponentForMessageRequest(BaseModel): + """ + RoleSelectComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None + max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None + disabled: Optional[StrictBool] = None + default_values: Optional[Annotated[List[RoleSelectDefaultValue], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleSelectComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleSelectComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RoleSelectComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [RoleSelectDefaultValue.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/role_select_component_response.py b/dc_rest/models/role_select_component_response.py new file mode 100644 index 0000000..2c6cd0e --- /dev/null +++ b/dc_rest/models/role_select_component_response.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse +from typing import Optional, Set +from typing_extensions import Self + +class RoleSelectComponentResponse(BaseModel): + """ + RoleSelectComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + placeholder: Optional[StrictStr] = None + min_values: Optional[StrictInt] = None + max_values: Optional[StrictInt] = None + disabled: Optional[StrictBool] = None + default_values: Optional[List[RoleSelectDefaultValueResponse]] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleSelectComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleSelectComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RoleSelectComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [RoleSelectDefaultValueResponse.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/role_select_default_value.py b/dc_rest/models/role_select_default_value.py new file mode 100644 index 0000000..24bf43b --- /dev/null +++ b/dc_rest/models/role_select_default_value.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RoleSelectDefaultValue(BaseModel): + """ + RoleSelectDefaultValue + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleSelectDefaultValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleSelectDefaultValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RoleSelectDefaultValue) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/role_select_default_value_response.py b/dc_rest/models/role_select_default_value_response.py new file mode 100644 index 0000000..ba025db --- /dev/null +++ b/dc_rest/models/role_select_default_value_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RoleSelectDefaultValueResponse(BaseModel): + """ + RoleSelectDefaultValueResponse + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleSelectDefaultValueResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleSelectDefaultValueResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in RoleSelectDefaultValueResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/scheduled_event_response.py b/dc_rest/models/scheduled_event_response.py new file mode 100644 index 0000000..9353bb2 --- /dev/null +++ b/dc_rest/models/scheduled_event_response.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ScheduledEventResponse(BaseModel): + """ + ScheduledEventResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + creator_id: Optional[Annotated[str, Field(strict=True)]] = None + creator: Optional[UserResponse] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + status: Optional[StrictInt] + entity_type: Optional[StrictInt] + entity_id: Optional[Annotated[str, Field(strict=True)]] = None + user_count: Optional[StrictInt] = None + privacy_level: Optional[Any] + user_rsvp: Optional[ScheduledEventUserResponse] = None + __properties: ClassVar[List[str]] = ["id", "guild_id", "name", "description", "channel_id", "creator_id", "creator", "image", "scheduled_start_time", "scheduled_end_time", "status", "entity_type", "entity_id", "user_count", "privacy_level", "user_rsvp"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('entity_id') + def entity_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScheduledEventResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator + if self.creator: + _dict['creator'] = self.creator.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_rsvp + if self.user_rsvp: + _dict['user_rsvp'] = self.user_rsvp.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creator (nullable) is None + # and model_fields_set contains the field + if self.creator is None and "creator" in self.model_fields_set: + _dict['creator'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if user_count (nullable) is None + # and model_fields_set contains the field + if self.user_count is None and "user_count" in self.model_fields_set: + _dict['user_count'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if user_rsvp (nullable) is None + # and model_fields_set contains the field + if self.user_rsvp is None and "user_rsvp" in self.model_fields_set: + _dict['user_rsvp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScheduledEventResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ScheduledEventResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "channel_id": obj.get("channel_id"), + "creator_id": obj.get("creator_id"), + "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None, + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "status": obj.get("status"), + "entity_type": obj.get("entity_type"), + "entity_id": obj.get("entity_id"), + "user_count": obj.get("user_count"), + "privacy_level": obj.get("privacy_level"), + "user_rsvp": ScheduledEventUserResponse.from_dict(obj["user_rsvp"]) if obj.get("user_rsvp") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/scheduled_event_user_response.py b/dc_rest/models/scheduled_event_user_response.py new file mode 100644 index 0000000..865b394 --- /dev/null +++ b/dc_rest/models/scheduled_event_user_response.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class ScheduledEventUserResponse(BaseModel): + """ + ScheduledEventUserResponse + """ # noqa: E501 + guild_scheduled_event_id: Annotated[str, Field(strict=True)] + user_id: Annotated[str, Field(strict=True)] + user: Optional[UserResponse] = None + member: Optional[GuildMemberResponse] = None + __properties: ClassVar[List[str]] = ["guild_scheduled_event_id", "user_id", "user", "member"] + + @field_validator('guild_scheduled_event_id') + def guild_scheduled_event_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('user_id') + def user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScheduledEventUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScheduledEventUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ScheduledEventUserResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_scheduled_event_id": obj.get("guild_scheduled_event_id"), + "user_id": obj.get("user_id"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "member": GuildMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/sdk_message_request.py b/dc_rest/models/sdk_message_request.py new file mode 100644 index 0000000..d90de29 --- /dev/null +++ b/dc_rest/models/sdk_message_request.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest +from dc_rest.models.message_attachment_request import MessageAttachmentRequest +from dc_rest.models.message_reference_request import MessageReferenceRequest +from dc_rest.models.poll_create_request import PollCreateRequest +from dc_rest.models.rich_embed import RichEmbed +from typing import Optional, Set +from typing_extensions import Self + +class SDKMessageRequest(BaseModel): + """ + SDKMessageRequest + """ # noqa: E501 + content: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None + embeds: Optional[Annotated[List[RichEmbed], Field(max_length=10)]] = None + allowed_mentions: Optional[MessageAllowedMentionsRequest] = None + sticker_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = None + components: Optional[Annotated[List[BaseCreateMessageCreateRequestComponentsInner], Field(max_length=40)]] = None + flags: Optional[StrictInt] = None + attachments: Optional[Annotated[List[MessageAttachmentRequest], Field(max_length=10)]] = None + poll: Optional[PollCreateRequest] = None + confetti_potion: Optional[Dict[str, Any]] = None + message_reference: Optional[MessageReferenceRequest] = None + nonce: Optional[BasicMessageResponseNonce] = None + enforce_nonce: Optional[StrictBool] = None + tts: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["content", "embeds", "allowed_mentions", "sticker_ids", "components", "flags", "attachments", "poll", "confetti_potion", "message_reference", "nonce", "enforce_nonce", "tts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SDKMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embeds (list) + _items = [] + if self.embeds: + for _item_embeds in self.embeds: + if _item_embeds: + _items.append(_item_embeds.to_dict()) + _dict['embeds'] = _items + # override the default output from pydantic by calling `to_dict()` of allowed_mentions + if self.allowed_mentions: + _dict['allowed_mentions'] = self.allowed_mentions.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of poll + if self.poll: + _dict['poll'] = self.poll.to_dict() + # override the default output from pydantic by calling `to_dict()` of message_reference + if self.message_reference: + _dict['message_reference'] = self.message_reference.to_dict() + # override the default output from pydantic by calling `to_dict()` of nonce + if self.nonce: + _dict['nonce'] = self.nonce.to_dict() + # set to None if content (nullable) is None + # and model_fields_set contains the field + if self.content is None and "content" in self.model_fields_set: + _dict['content'] = None + + # set to None if embeds (nullable) is None + # and model_fields_set contains the field + if self.embeds is None and "embeds" in self.model_fields_set: + _dict['embeds'] = None + + # set to None if allowed_mentions (nullable) is None + # and model_fields_set contains the field + if self.allowed_mentions is None and "allowed_mentions" in self.model_fields_set: + _dict['allowed_mentions'] = None + + # set to None if sticker_ids (nullable) is None + # and model_fields_set contains the field + if self.sticker_ids is None and "sticker_ids" in self.model_fields_set: + _dict['sticker_ids'] = None + + # set to None if components (nullable) is None + # and model_fields_set contains the field + if self.components is None and "components" in self.model_fields_set: + _dict['components'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + # set to None if poll (nullable) is None + # and model_fields_set contains the field + if self.poll is None and "poll" in self.model_fields_set: + _dict['poll'] = None + + # set to None if message_reference (nullable) is None + # and model_fields_set contains the field + if self.message_reference is None and "message_reference" in self.model_fields_set: + _dict['message_reference'] = None + + # set to None if nonce (nullable) is None + # and model_fields_set contains the field + if self.nonce is None and "nonce" in self.model_fields_set: + _dict['nonce'] = None + + # set to None if enforce_nonce (nullable) is None + # and model_fields_set contains the field + if self.enforce_nonce is None and "enforce_nonce" in self.model_fields_set: + _dict['enforce_nonce'] = None + + # set to None if tts (nullable) is None + # and model_fields_set contains the field + if self.tts is None and "tts" in self.model_fields_set: + _dict['tts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SDKMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SDKMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "embeds": [RichEmbed.from_dict(_item) for _item in obj["embeds"]] if obj.get("embeds") is not None else None, + "allowed_mentions": MessageAllowedMentionsRequest.from_dict(obj["allowed_mentions"]) if obj.get("allowed_mentions") is not None else None, + "sticker_ids": obj.get("sticker_ids"), + "components": [BaseCreateMessageCreateRequestComponentsInner.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "flags": obj.get("flags"), + "attachments": [MessageAttachmentRequest.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "poll": PollCreateRequest.from_dict(obj["poll"]) if obj.get("poll") is not None else None, + "confetti_potion": obj.get("confetti_potion"), + "message_reference": MessageReferenceRequest.from_dict(obj["message_reference"]) if obj.get("message_reference") is not None else None, + "nonce": BasicMessageResponseNonce.from_dict(obj["nonce"]) if obj.get("nonce") is not None else None, + "enforce_nonce": obj.get("enforce_nonce"), + "tts": obj.get("tts") + }) + return _obj + + diff --git a/dc_rest/models/section_component_for_message_request.py b/dc_rest/models/section_component_for_message_request.py new file mode 100644 index 0000000..d56bfa3 --- /dev/null +++ b/dc_rest/models/section_component_for_message_request.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest +from typing import Optional, Set +from typing_extensions import Self + +class SectionComponentForMessageRequest(BaseModel): + """ + SectionComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + components: Annotated[List[TextDisplayComponentForMessageRequest], Field(min_length=1, max_length=3)] + accessory: SectionComponentForMessageRequestAccessory + __properties: ClassVar[List[str]] = ["type", "components", "accessory"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SectionComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of accessory + if self.accessory: + _dict['accessory'] = self.accessory.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SectionComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SectionComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "components": [TextDisplayComponentForMessageRequest.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "accessory": SectionComponentForMessageRequestAccessory.from_dict(obj["accessory"]) if obj.get("accessory") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/section_component_for_message_request_accessory.py b/dc_rest/models/section_component_for_message_request_accessory.py new file mode 100644 index 0000000..b051800 --- /dev/null +++ b/dc_rest/models/section_component_for_message_request_accessory.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest +from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SECTIONCOMPONENTFORMESSAGEREQUESTACCESSORY_ONE_OF_SCHEMAS = ["ButtonComponentForMessageRequest", "ThumbnailComponentForMessageRequest"] + +class SectionComponentForMessageRequestAccessory(BaseModel): + """ + SectionComponentForMessageRequestAccessory + """ + # data type: ButtonComponentForMessageRequest + oneof_schema_1_validator: Optional[ButtonComponentForMessageRequest] = None + # data type: ThumbnailComponentForMessageRequest + oneof_schema_2_validator: Optional[ThumbnailComponentForMessageRequest] = None + actual_instance: Optional[Union[ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest]] = None + one_of_schemas: Set[str] = { "ButtonComponentForMessageRequest", "ThumbnailComponentForMessageRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SectionComponentForMessageRequestAccessory.model_construct() + error_messages = [] + match = 0 + # validate data type: ButtonComponentForMessageRequest + if not isinstance(v, ButtonComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentForMessageRequest`") + else: + match += 1 + # validate data type: ThumbnailComponentForMessageRequest + if not isinstance(v, ThumbnailComponentForMessageRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ThumbnailComponentForMessageRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SectionComponentForMessageRequestAccessory with oneOf schemas: ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SectionComponentForMessageRequestAccessory with oneOf schemas: ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ButtonComponentForMessageRequest + try: + instance.actual_instance = ButtonComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ThumbnailComponentForMessageRequest + try: + instance.actual_instance = ThumbnailComponentForMessageRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SectionComponentForMessageRequestAccessory with oneOf schemas: ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SectionComponentForMessageRequestAccessory with oneOf schemas: ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentForMessageRequest, ThumbnailComponentForMessageRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/section_component_response.py b/dc_rest/models/section_component_response.py new file mode 100644 index 0000000..9df761b --- /dev/null +++ b/dc_rest/models/section_component_response.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse +from typing import Optional, Set +from typing_extensions import Self + +class SectionComponentResponse(BaseModel): + """ + SectionComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + components: List[TextDisplayComponentResponse] + accessory: SectionComponentResponseAccessory + __properties: ClassVar[List[str]] = ["type", "id", "components", "accessory"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SectionComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + if _item_components: + _items.append(_item_components.to_dict()) + _dict['components'] = _items + # override the default output from pydantic by calling `to_dict()` of accessory + if self.accessory: + _dict['accessory'] = self.accessory.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SectionComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SectionComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "components": [TextDisplayComponentResponse.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None, + "accessory": SectionComponentResponseAccessory.from_dict(obj["accessory"]) if obj.get("accessory") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/section_component_response_accessory.py b/dc_rest/models/section_component_response_accessory.py new file mode 100644 index 0000000..9e9ad4a --- /dev/null +++ b/dc_rest/models/section_component_response_accessory.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from dc_rest.models.button_component_response import ButtonComponentResponse +from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SECTIONCOMPONENTRESPONSEACCESSORY_ONE_OF_SCHEMAS = ["ButtonComponentResponse", "ThumbnailComponentResponse"] + +class SectionComponentResponseAccessory(BaseModel): + """ + SectionComponentResponseAccessory + """ + # data type: ButtonComponentResponse + oneof_schema_1_validator: Optional[ButtonComponentResponse] = None + # data type: ThumbnailComponentResponse + oneof_schema_2_validator: Optional[ThumbnailComponentResponse] = None + actual_instance: Optional[Union[ButtonComponentResponse, ThumbnailComponentResponse]] = None + one_of_schemas: Set[str] = { "ButtonComponentResponse", "ThumbnailComponentResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SectionComponentResponseAccessory.model_construct() + error_messages = [] + match = 0 + # validate data type: ButtonComponentResponse + if not isinstance(v, ButtonComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ButtonComponentResponse`") + else: + match += 1 + # validate data type: ThumbnailComponentResponse + if not isinstance(v, ThumbnailComponentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ThumbnailComponentResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SectionComponentResponseAccessory with oneOf schemas: ButtonComponentResponse, ThumbnailComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SectionComponentResponseAccessory with oneOf schemas: ButtonComponentResponse, ThumbnailComponentResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ButtonComponentResponse + try: + instance.actual_instance = ButtonComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ThumbnailComponentResponse + try: + instance.actual_instance = ThumbnailComponentResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SectionComponentResponseAccessory with oneOf schemas: ButtonComponentResponse, ThumbnailComponentResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SectionComponentResponseAccessory with oneOf schemas: ButtonComponentResponse, ThumbnailComponentResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ButtonComponentResponse, ThumbnailComponentResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/separator_component_for_message_request.py b/dc_rest/models/separator_component_for_message_request.py new file mode 100644 index 0000000..7cb8ca1 --- /dev/null +++ b/dc_rest/models/separator_component_for_message_request.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SeparatorComponentForMessageRequest(BaseModel): + """ + SeparatorComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + spacing: Optional[StrictInt] = None + divider: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["type", "spacing", "divider"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SeparatorComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if divider (nullable) is None + # and model_fields_set contains the field + if self.divider is None and "divider" in self.model_fields_set: + _dict['divider'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SeparatorComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SeparatorComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "spacing": obj.get("spacing"), + "divider": obj.get("divider") + }) + return _obj + + diff --git a/dc_rest/models/separator_component_response.py b/dc_rest/models/separator_component_response.py new file mode 100644 index 0000000..da695b8 --- /dev/null +++ b/dc_rest/models/separator_component_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SeparatorComponentResponse(BaseModel): + """ + SeparatorComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + spacing: StrictInt + divider: StrictBool + __properties: ClassVar[List[str]] = ["type", "id", "spacing", "divider"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SeparatorComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SeparatorComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SeparatorComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "spacing": obj.get("spacing"), + "divider": obj.get("divider") + }) + return _obj + + diff --git a/dc_rest/models/set_channel_permission_overwrite_request.py b/dc_rest/models/set_channel_permission_overwrite_request.py new file mode 100644 index 0000000..5722607 --- /dev/null +++ b/dc_rest/models/set_channel_permission_overwrite_request.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SetChannelPermissionOverwriteRequest(BaseModel): + """ + SetChannelPermissionOverwriteRequest + """ # noqa: E501 + type: Optional[StrictInt] = None + allow: Optional[StrictInt] = None + deny: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["type", "allow", "deny"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetChannelPermissionOverwriteRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if allow (nullable) is None + # and model_fields_set contains the field + if self.allow is None and "allow" in self.model_fields_set: + _dict['allow'] = None + + # set to None if deny (nullable) is None + # and model_fields_set contains the field + if self.deny is None and "deny" in self.model_fields_set: + _dict['deny'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetChannelPermissionOverwriteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SetChannelPermissionOverwriteRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "allow": obj.get("allow"), + "deny": obj.get("deny") + }) + return _obj + + diff --git a/dc_rest/models/set_guild_application_command_permissions_request.py b/dc_rest/models/set_guild_application_command_permissions_request.py new file mode 100644 index 0000000..730f800 --- /dev/null +++ b/dc_rest/models/set_guild_application_command_permissions_request.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.application_command_permission import ApplicationCommandPermission +from typing import Optional, Set +from typing_extensions import Self + +class SetGuildApplicationCommandPermissionsRequest(BaseModel): + """ + SetGuildApplicationCommandPermissionsRequest + """ # noqa: E501 + permissions: Optional[Annotated[List[ApplicationCommandPermission], Field(max_length=100)]] = None + __properties: ClassVar[List[str]] = ["permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetGuildApplicationCommandPermissionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetGuildApplicationCommandPermissionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SetGuildApplicationCommandPermissionsRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "permissions": [ApplicationCommandPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/set_guild_mfa_level_request.py b/dc_rest/models/set_guild_mfa_level_request.py new file mode 100644 index 0000000..6bdfcca --- /dev/null +++ b/dc_rest/models/set_guild_mfa_level_request.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SetGuildMfaLevelRequest(BaseModel): + """ + SetGuildMfaLevelRequest + """ # noqa: E501 + level: StrictInt + __properties: ClassVar[List[str]] = ["level"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetGuildMfaLevelRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetGuildMfaLevelRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SetGuildMfaLevelRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "level": obj.get("level") + }) + return _obj + + diff --git a/dc_rest/models/settings_emoji_response.py b/dc_rest/models/settings_emoji_response.py new file mode 100644 index 0000000..843d8da --- /dev/null +++ b/dc_rest/models/settings_emoji_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SettingsEmojiResponse(BaseModel): + """ + SettingsEmojiResponse + """ # noqa: E501 + id: Optional[Annotated[str, Field(strict=True)]] = None + name: Optional[StrictStr] = None + animated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "animated"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsEmojiResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if animated (nullable) is None + # and model_fields_set contains the field + if self.animated is None and "animated" in self.model_fields_set: + _dict['animated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsEmojiResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SettingsEmojiResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "animated": obj.get("animated") + }) + return _obj + + diff --git a/dc_rest/models/slack_webhook.py b/dc_rest/models/slack_webhook.py new file mode 100644 index 0000000..ab31670 --- /dev/null +++ b/dc_rest/models/slack_webhook.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed +from typing import Optional, Set +from typing_extensions import Self + +class SlackWebhook(BaseModel): + """ + SlackWebhook + """ # noqa: E501 + text: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + username: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + icon_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + attachments: Optional[Annotated[List[WebhookSlackEmbed], Field(max_length=1521)]] = None + __properties: ClassVar[List[str]] = ["text", "username", "icon_url", "attachments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SlackWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if icon_url (nullable) is None + # and model_fields_set contains the field + if self.icon_url is None and "icon_url" in self.model_fields_set: + _dict['icon_url'] = None + + # set to None if attachments (nullable) is None + # and model_fields_set contains the field + if self.attachments is None and "attachments" in self.model_fields_set: + _dict['attachments'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SlackWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SlackWebhook) in the input: " + _key) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "username": obj.get("username"), + "icon_url": obj.get("icon_url"), + "attachments": [WebhookSlackEmbed.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/soundboard_create_request.py b/dc_rest/models/soundboard_create_request.py new file mode 100644 index 0000000..a736f07 --- /dev/null +++ b/dc_rest/models/soundboard_create_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SoundboardCreateRequest(BaseModel): + """ + SoundboardCreateRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=2, strict=True, max_length=32)] + volume: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=32)]] = None + sound: StrictStr + __properties: ClassVar[List[str]] = ["name", "volume", "emoji_id", "emoji_name", "sound"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SoundboardCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if volume (nullable) is None + # and model_fields_set contains the field + if self.volume is None and "volume" in self.model_fields_set: + _dict['volume'] = None + + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SoundboardCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SoundboardCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "volume": obj.get("volume"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "sound": obj.get("sound") + }) + return _obj + + diff --git a/dc_rest/models/soundboard_patch_request_partial.py b/dc_rest/models/soundboard_patch_request_partial.py new file mode 100644 index 0000000..7b4636c --- /dev/null +++ b/dc_rest/models/soundboard_patch_request_partial.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SoundboardPatchRequestPartial(BaseModel): + """ + SoundboardPatchRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=32)]] = None + volume: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=32)]] = None + __properties: ClassVar[List[str]] = ["name", "volume", "emoji_id", "emoji_name"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SoundboardPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if volume (nullable) is None + # and model_fields_set contains the field + if self.volume is None and "volume" in self.model_fields_set: + _dict['volume'] = None + + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SoundboardPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SoundboardPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "volume": obj.get("volume"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/soundboard_sound_response.py b/dc_rest/models/soundboard_sound_response.py new file mode 100644 index 0000000..a3fc38a --- /dev/null +++ b/dc_rest/models/soundboard_sound_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class SoundboardSoundResponse(BaseModel): + """ + SoundboardSoundResponse + """ # noqa: E501 + name: StrictStr + sound_id: Annotated[str, Field(strict=True)] + volume: Union[StrictFloat, StrictInt] + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[StrictStr] = None + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + available: StrictBool + user: Optional[UserResponse] = None + __properties: ClassVar[List[str]] = ["name", "sound_id", "volume", "emoji_id", "emoji_name", "guild_id", "available", "user"] + + @field_validator('sound_id') + def sound_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SoundboardSoundResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SoundboardSoundResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SoundboardSoundResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "sound_id": obj.get("sound_id"), + "volume": obj.get("volume"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "guild_id": obj.get("guild_id"), + "available": obj.get("available"), + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/soundboard_sound_send_request.py b/dc_rest/models/soundboard_sound_send_request.py new file mode 100644 index 0000000..dfd67d7 --- /dev/null +++ b/dc_rest/models/soundboard_sound_send_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SoundboardSoundSendRequest(BaseModel): + """ + SoundboardSoundSendRequest + """ # noqa: E501 + sound_id: Annotated[str, Field(strict=True)] + source_guild_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["sound_id", "source_guild_id"] + + @field_validator('sound_id') + def sound_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('source_guild_id') + def source_guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SoundboardSoundSendRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SoundboardSoundSendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SoundboardSoundSendRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "sound_id": obj.get("sound_id"), + "source_guild_id": obj.get("source_guild_id") + }) + return _obj + + diff --git a/dc_rest/models/spam_link_rule_response.py b/dc_rest/models/spam_link_rule_response.py new file mode 100644 index 0000000..14c80ae --- /dev/null +++ b/dc_rest/models/spam_link_rule_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner +from typing import Optional, Set +from typing_extensions import Self + +class SpamLinkRuleResponse(BaseModel): + """ + SpamLinkRuleResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + creator_id: Annotated[str, Field(strict=True)] + name: StrictStr + event_type: StrictInt + actions: List[DefaultKeywordRuleResponseActionsInner] + trigger_type: StrictInt + enabled: Optional[StrictBool] = None + exempt_roles: Optional[List[Annotated[str, Field(strict=True)]]] = None + exempt_channels: Optional[List[Annotated[str, Field(strict=True)]]] = None + trigger_metadata: Dict[str, Any] + __properties: ClassVar[List[str]] = ["id", "guild_id", "creator_id", "name", "event_type", "actions", "trigger_type", "enabled", "exempt_roles", "exempt_channels", "trigger_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SpamLinkRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if exempt_roles (nullable) is None + # and model_fields_set contains the field + if self.exempt_roles is None and "exempt_roles" in self.model_fields_set: + _dict['exempt_roles'] = None + + # set to None if exempt_channels (nullable) is None + # and model_fields_set contains the field + if self.exempt_channels is None and "exempt_channels" in self.model_fields_set: + _dict['exempt_channels'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SpamLinkRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in SpamLinkRuleResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "creator_id": obj.get("creator_id"), + "name": obj.get("name"), + "event_type": obj.get("event_type"), + "actions": [DefaultKeywordRuleResponseActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None, + "trigger_type": obj.get("trigger_type"), + "enabled": obj.get("enabled"), + "exempt_roles": obj.get("exempt_roles"), + "exempt_channels": obj.get("exempt_channels"), + "trigger_metadata": obj.get("trigger_metadata") + }) + return _obj + + diff --git a/dc_rest/models/stage_instance_response.py b/dc_rest/models/stage_instance_response.py new file mode 100644 index 0000000..419c476 --- /dev/null +++ b/dc_rest/models/stage_instance_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class StageInstanceResponse(BaseModel): + """ + StageInstanceResponse + """ # noqa: E501 + guild_id: Annotated[str, Field(strict=True)] + channel_id: Annotated[str, Field(strict=True)] + topic: StrictStr + privacy_level: StrictInt + id: Annotated[str, Field(strict=True)] + discoverable_disabled: Optional[StrictBool] = None + guild_scheduled_event_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["guild_id", "channel_id", "topic", "privacy_level", "id", "discoverable_disabled", "guild_scheduled_event_id"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_scheduled_event_id') + def guild_scheduled_event_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if discoverable_disabled (nullable) is None + # and model_fields_set contains the field + if self.discoverable_disabled is None and "discoverable_disabled" in self.model_fields_set: + _dict['discoverable_disabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StageInstanceResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_id": obj.get("guild_id"), + "channel_id": obj.get("channel_id"), + "topic": obj.get("topic"), + "privacy_level": obj.get("privacy_level"), + "id": obj.get("id"), + "discoverable_disabled": obj.get("discoverable_disabled"), + "guild_scheduled_event_id": obj.get("guild_scheduled_event_id") + }) + return _obj + + diff --git a/dc_rest/models/stage_scheduled_event_create_request.py b/dc_rest/models/stage_scheduled_event_create_request.py new file mode 100644 index 0000000..42f2282 --- /dev/null +++ b/dc_rest/models/stage_scheduled_event_create_request.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class StageScheduledEventCreateRequest(BaseModel): + """ + StageScheduledEventCreateRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + privacy_level: Optional[Any] + entity_type: Optional[StrictInt] + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["name", "description", "image", "scheduled_start_time", "scheduled_end_time", "privacy_level", "entity_type", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageScheduledEventCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageScheduledEventCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StageScheduledEventCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "privacy_level": obj.get("privacy_level"), + "entity_type": obj.get("entity_type"), + "channel_id": obj.get("channel_id"), + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/stage_scheduled_event_patch_request_partial.py b/dc_rest/models/stage_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..cb53c9c --- /dev/null +++ b/dc_rest/models/stage_scheduled_event_patch_request_partial.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class StageScheduledEventPatchRequestPartial(BaseModel): + """ + StageScheduledEventPatchRequestPartial + """ # noqa: E501 + status: Optional[StrictInt] = None + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: Optional[datetime] = None + scheduled_end_time: Optional[datetime] = None + entity_type: Optional[StrictInt] = None + privacy_level: Optional[Any] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["status", "name", "description", "image", "scheduled_start_time", "scheduled_end_time", "entity_type", "privacy_level", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageScheduledEventPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageScheduledEventPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StageScheduledEventPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "entity_type": obj.get("entity_type"), + "privacy_level": obj.get("privacy_level"), + "channel_id": obj.get("channel_id"), + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/stage_scheduled_event_response.py b/dc_rest/models/stage_scheduled_event_response.py new file mode 100644 index 0000000..7c28eb3 --- /dev/null +++ b/dc_rest/models/stage_scheduled_event_response.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class StageScheduledEventResponse(BaseModel): + """ + StageScheduledEventResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + creator_id: Optional[Annotated[str, Field(strict=True)]] = None + creator: Optional[UserResponse] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + status: Optional[StrictInt] + entity_type: Optional[StrictInt] + entity_id: Optional[Annotated[str, Field(strict=True)]] = None + user_count: Optional[StrictInt] = None + privacy_level: Optional[Any] + user_rsvp: Optional[ScheduledEventUserResponse] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["id", "guild_id", "name", "description", "channel_id", "creator_id", "creator", "image", "scheduled_start_time", "scheduled_end_time", "status", "entity_type", "entity_id", "user_count", "privacy_level", "user_rsvp", "entity_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('entity_id') + def entity_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageScheduledEventResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator + if self.creator: + _dict['creator'] = self.creator.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_rsvp + if self.user_rsvp: + _dict['user_rsvp'] = self.user_rsvp.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creator (nullable) is None + # and model_fields_set contains the field + if self.creator is None and "creator" in self.model_fields_set: + _dict['creator'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if user_count (nullable) is None + # and model_fields_set contains the field + if self.user_count is None and "user_count" in self.model_fields_set: + _dict['user_count'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if user_rsvp (nullable) is None + # and model_fields_set contains the field + if self.user_rsvp is None and "user_rsvp" in self.model_fields_set: + _dict['user_rsvp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageScheduledEventResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StageScheduledEventResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "channel_id": obj.get("channel_id"), + "creator_id": obj.get("creator_id"), + "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None, + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "status": obj.get("status"), + "entity_type": obj.get("entity_type"), + "entity_id": obj.get("entity_id"), + "user_count": obj.get("user_count"), + "privacy_level": obj.get("privacy_level"), + "user_rsvp": ScheduledEventUserResponse.from_dict(obj["user_rsvp"]) if obj.get("user_rsvp") is not None else None, + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/standard_sticker_response.py b/dc_rest/models/standard_sticker_response.py new file mode 100644 index 0000000..730affc --- /dev/null +++ b/dc_rest/models/standard_sticker_response.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class StandardStickerResponse(BaseModel): + """ + StandardStickerResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + tags: StrictStr + type: StrictInt + format_type: Optional[StrictInt] = None + description: Optional[StrictStr] = None + pack_id: Annotated[str, Field(strict=True)] + sort_value: StrictInt + __properties: ClassVar[List[str]] = ["id", "name", "tags", "type", "format_type", "description", "pack_id", "sort_value"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('pack_id') + def pack_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StandardStickerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if format_type (nullable) is None + # and model_fields_set contains the field + if self.format_type is None and "format_type" in self.model_fields_set: + _dict['format_type'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StandardStickerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StandardStickerResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "tags": obj.get("tags"), + "type": obj.get("type"), + "format_type": obj.get("format_type"), + "description": obj.get("description"), + "pack_id": obj.get("pack_id"), + "sort_value": obj.get("sort_value") + }) + return _obj + + diff --git a/dc_rest/models/sticker_pack_collection_response.py b/dc_rest/models/sticker_pack_collection_response.py new file mode 100644 index 0000000..129e5c4 --- /dev/null +++ b/dc_rest/models/sticker_pack_collection_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dc_rest.models.sticker_pack_response import StickerPackResponse +from typing import Optional, Set +from typing_extensions import Self + +class StickerPackCollectionResponse(BaseModel): + """ + StickerPackCollectionResponse + """ # noqa: E501 + sticker_packs: List[StickerPackResponse] + __properties: ClassVar[List[str]] = ["sticker_packs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StickerPackCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sticker_packs (list) + _items = [] + if self.sticker_packs: + for _item_sticker_packs in self.sticker_packs: + if _item_sticker_packs: + _items.append(_item_sticker_packs.to_dict()) + _dict['sticker_packs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StickerPackCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StickerPackCollectionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "sticker_packs": [StickerPackResponse.from_dict(_item) for _item in obj["sticker_packs"]] if obj.get("sticker_packs") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/sticker_pack_response.py b/dc_rest/models/sticker_pack_response.py new file mode 100644 index 0000000..703bf62 --- /dev/null +++ b/dc_rest/models/sticker_pack_response.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.standard_sticker_response import StandardStickerResponse +from typing import Optional, Set +from typing_extensions import Self + +class StickerPackResponse(BaseModel): + """ + StickerPackResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + sku_id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + stickers: List[StandardStickerResponse] + cover_sticker_id: Optional[Annotated[str, Field(strict=True)]] = None + banner_asset_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "sku_id", "name", "description", "stickers", "cover_sticker_id", "banner_asset_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('cover_sticker_id') + def cover_sticker_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('banner_asset_id') + def banner_asset_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StickerPackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in stickers (list) + _items = [] + if self.stickers: + for _item_stickers in self.stickers: + if _item_stickers: + _items.append(_item_stickers.to_dict()) + _dict['stickers'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StickerPackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StickerPackResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sku_id": obj.get("sku_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "stickers": [StandardStickerResponse.from_dict(_item) for _item in obj["stickers"]] if obj.get("stickers") is not None else None, + "cover_sticker_id": obj.get("cover_sticker_id"), + "banner_asset_id": obj.get("banner_asset_id") + }) + return _obj + + diff --git a/dc_rest/models/string_select_component_for_message_request.py b/dc_rest/models/string_select_component_for_message_request.py new file mode 100644 index 0000000..239e64c --- /dev/null +++ b/dc_rest/models/string_select_component_for_message_request.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest +from typing import Optional, Set +from typing_extensions import Self + +class StringSelectComponentForMessageRequest(BaseModel): + """ + StringSelectComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None + max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None + disabled: Optional[StrictBool] = None + options: Annotated[List[StringSelectOptionForMessageRequest], Field(min_length=1, max_length=25)] + __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StringSelectComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StringSelectComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StringSelectComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "options": [StringSelectOptionForMessageRequest.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/string_select_component_response.py b/dc_rest/models/string_select_component_response.py new file mode 100644 index 0000000..b8b91d4 --- /dev/null +++ b/dc_rest/models/string_select_component_response.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.string_select_option_response import StringSelectOptionResponse +from typing import Optional, Set +from typing_extensions import Self + +class StringSelectComponentResponse(BaseModel): + """ + StringSelectComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + placeholder: Optional[StrictStr] = None + min_values: Optional[StrictInt] = None + max_values: Optional[StrictInt] = None + disabled: Optional[StrictBool] = None + options: List[StringSelectOptionResponse] + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StringSelectComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StringSelectComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StringSelectComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "options": [StringSelectOptionResponse.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/string_select_option_for_message_request.py b/dc_rest/models/string_select_option_for_message_request.py new file mode 100644 index 0000000..f01dd6a --- /dev/null +++ b/dc_rest/models/string_select_option_for_message_request.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest +from typing import Optional, Set +from typing_extensions import Self + +class StringSelectOptionForMessageRequest(BaseModel): + """ + StringSelectOptionForMessageRequest + """ # noqa: E501 + label: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + value: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + default: Optional[StrictBool] = None + emoji: Optional[ComponentEmojiForMessageRequest] = None + __properties: ClassVar[List[str]] = ["label", "value", "description", "default", "emoji"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StringSelectOptionForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if default (nullable) is None + # and model_fields_set contains the field + if self.default is None and "default" in self.model_fields_set: + _dict['default'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StringSelectOptionForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StringSelectOptionForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "value": obj.get("value"), + "description": obj.get("description"), + "default": obj.get("default"), + "emoji": ComponentEmojiForMessageRequest.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/string_select_option_response.py b/dc_rest/models/string_select_option_response.py new file mode 100644 index 0000000..822ad1c --- /dev/null +++ b/dc_rest/models/string_select_option_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.component_emoji_response import ComponentEmojiResponse +from typing import Optional, Set +from typing_extensions import Self + +class StringSelectOptionResponse(BaseModel): + """ + StringSelectOptionResponse + """ # noqa: E501 + label: StrictStr + value: StrictStr + description: Optional[StrictStr] = None + emoji: Optional[ComponentEmojiResponse] = None + default: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["label", "value", "description", "emoji", "default"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StringSelectOptionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of emoji + if self.emoji: + _dict['emoji'] = self.emoji.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if emoji (nullable) is None + # and model_fields_set contains the field + if self.emoji is None and "emoji" in self.model_fields_set: + _dict['emoji'] = None + + # set to None if default (nullable) is None + # and model_fields_set contains the field + if self.default is None and "default" in self.model_fields_set: + _dict['default'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StringSelectOptionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in StringSelectOptionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "value": obj.get("value"), + "description": obj.get("description"), + "emoji": ComponentEmojiResponse.from_dict(obj["emoji"]) if obj.get("emoji") is not None else None, + "default": obj.get("default") + }) + return _obj + + diff --git a/dc_rest/models/team_member_response.py b/dc_rest/models/team_member_response.py new file mode 100644 index 0000000..4fd15aa --- /dev/null +++ b/dc_rest/models/team_member_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class TeamMemberResponse(BaseModel): + """ + TeamMemberResponse + """ # noqa: E501 + user: UserResponse + team_id: Annotated[str, Field(strict=True)] + membership_state: StrictInt + __properties: ClassVar[List[str]] = ["user", "team_id", "membership_state"] + + @field_validator('team_id') + def team_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TeamMemberResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "user": UserResponse.from_dict(obj["user"]) if obj.get("user") is not None else None, + "team_id": obj.get("team_id"), + "membership_state": obj.get("membership_state") + }) + return _obj + + diff --git a/dc_rest/models/team_response.py b/dc_rest/models/team_response.py new file mode 100644 index 0000000..a3410e0 --- /dev/null +++ b/dc_rest/models/team_response.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.team_member_response import TeamMemberResponse +from typing import Optional, Set +from typing_extensions import Self + +class TeamResponse(BaseModel): + """ + TeamResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + icon: Optional[StrictStr] = None + name: StrictStr + owner_user_id: Annotated[str, Field(strict=True)] + members: List[TeamMemberResponse] + __properties: ClassVar[List[str]] = ["id", "icon", "name", "owner_user_id", "members"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_user_id') + def owner_user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TeamResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "icon": obj.get("icon"), + "name": obj.get("name"), + "owner_user_id": obj.get("owner_user_id"), + "members": [TeamMemberResponse.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/text_display_component_for_message_request.py b/dc_rest/models/text_display_component_for_message_request.py new file mode 100644 index 0000000..4453524 --- /dev/null +++ b/dc_rest/models/text_display_component_for_message_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TextDisplayComponentForMessageRequest(BaseModel): + """ + TextDisplayComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + content: Annotated[str, Field(min_length=1, strict=True, max_length=4000)] + __properties: ClassVar[List[str]] = ["type", "content"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextDisplayComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextDisplayComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TextDisplayComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "content": obj.get("content") + }) + return _obj + + diff --git a/dc_rest/models/text_display_component_response.py b/dc_rest/models/text_display_component_response.py new file mode 100644 index 0000000..284c031 --- /dev/null +++ b/dc_rest/models/text_display_component_response.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TextDisplayComponentResponse(BaseModel): + """ + TextDisplayComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + content: StrictStr + __properties: ClassVar[List[str]] = ["type", "id", "content"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextDisplayComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextDisplayComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TextDisplayComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "content": obj.get("content") + }) + return _obj + + diff --git a/dc_rest/models/text_input_component_for_modal_request.py b/dc_rest/models/text_input_component_for_modal_request.py new file mode 100644 index 0000000..65b6cb5 --- /dev/null +++ b/dc_rest/models/text_input_component_for_modal_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TextInputComponentForModalRequest(BaseModel): + """ + TextInputComponentForModalRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + style: StrictInt + label: Annotated[str, Field(strict=True, max_length=45)] + value: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = None + placeholder: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + required: Optional[StrictBool] = None + min_length: Optional[Annotated[int, Field(le=4000, strict=True, ge=0)]] = None + max_length: Optional[Annotated[int, Field(le=4000, strict=True, ge=1)]] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "style", "label", "value", "placeholder", "required", "min_length", "max_length"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextInputComponentForModalRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['min_length'] = None + + # set to None if max_length (nullable) is None + # and model_fields_set contains the field + if self.max_length is None and "max_length" in self.model_fields_set: + _dict['max_length'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextInputComponentForModalRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TextInputComponentForModalRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "style": obj.get("style"), + "label": obj.get("label"), + "value": obj.get("value"), + "placeholder": obj.get("placeholder"), + "required": obj.get("required"), + "min_length": obj.get("min_length"), + "max_length": obj.get("max_length") + }) + return _obj + + diff --git a/dc_rest/models/text_input_component_response.py b/dc_rest/models/text_input_component_response.py new file mode 100644 index 0000000..c211592 --- /dev/null +++ b/dc_rest/models/text_input_component_response.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TextInputComponentResponse(BaseModel): + """ + TextInputComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + style: StrictInt + label: Optional[StrictStr] = None + value: Optional[StrictStr] = None + placeholder: Optional[StrictStr] = None + required: Optional[StrictBool] = None + min_length: Optional[StrictInt] = None + max_length: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "style", "label", "value", "placeholder", "required", "min_length", "max_length"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextInputComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['min_length'] = None + + # set to None if max_length (nullable) is None + # and model_fields_set contains the field + if self.max_length is None and "max_length" in self.model_fields_set: + _dict['max_length'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextInputComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in TextInputComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "style": obj.get("style"), + "label": obj.get("label"), + "value": obj.get("value"), + "placeholder": obj.get("placeholder"), + "required": obj.get("required"), + "min_length": obj.get("min_length"), + "max_length": obj.get("max_length") + }) + return _obj + + diff --git a/dc_rest/models/thread_member_response.py b/dc_rest/models/thread_member_response.py new file mode 100644 index 0000000..4ae735c --- /dev/null +++ b/dc_rest/models/thread_member_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_member_response import GuildMemberResponse +from typing import Optional, Set +from typing_extensions import Self + +class ThreadMemberResponse(BaseModel): + """ + ThreadMemberResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + user_id: Annotated[str, Field(strict=True)] + join_timestamp: datetime + flags: StrictInt + member: Optional[GuildMemberResponse] = None + __properties: ClassVar[List[str]] = ["id", "user_id", "join_timestamp", "flags", "member"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('user_id') + def user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreadMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreadMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThreadMemberResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "join_timestamp": obj.get("join_timestamp"), + "flags": obj.get("flags"), + "member": GuildMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/thread_metadata_response.py b/dc_rest/models/thread_metadata_response.py new file mode 100644 index 0000000..b2915d5 --- /dev/null +++ b/dc_rest/models/thread_metadata_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ThreadMetadataResponse(BaseModel): + """ + ThreadMetadataResponse + """ # noqa: E501 + archived: StrictBool + archive_timestamp: Optional[datetime] = None + auto_archive_duration: StrictInt + locked: StrictBool + create_timestamp: Optional[datetime] = None + invitable: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["archived", "archive_timestamp", "auto_archive_duration", "locked", "create_timestamp", "invitable"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreadMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if archive_timestamp (nullable) is None + # and model_fields_set contains the field + if self.archive_timestamp is None and "archive_timestamp" in self.model_fields_set: + _dict['archive_timestamp'] = None + + # set to None if create_timestamp (nullable) is None + # and model_fields_set contains the field + if self.create_timestamp is None and "create_timestamp" in self.model_fields_set: + _dict['create_timestamp'] = None + + # set to None if invitable (nullable) is None + # and model_fields_set contains the field + if self.invitable is None and "invitable" in self.model_fields_set: + _dict['invitable'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreadMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThreadMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "archived": obj.get("archived"), + "archive_timestamp": obj.get("archive_timestamp"), + "auto_archive_duration": obj.get("auto_archive_duration"), + "locked": obj.get("locked"), + "create_timestamp": obj.get("create_timestamp"), + "invitable": obj.get("invitable") + }) + return _obj + + diff --git a/dc_rest/models/thread_response.py b/dc_rest/models/thread_response.py new file mode 100644 index 0000000..6e486be --- /dev/null +++ b/dc_rest/models/thread_response.py @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class ThreadResponse(BaseModel): + """ + ThreadResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + type: StrictInt + last_message_id: Optional[Annotated[str, Field(strict=True)]] = None + flags: StrictInt + last_pin_timestamp: Optional[datetime] = None + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + rate_limit_per_user: Optional[StrictInt] = None + bitrate: Optional[StrictInt] = None + user_limit: Optional[StrictInt] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + permissions: Optional[StrictStr] = None + owner_id: Annotated[str, Field(strict=True)] + thread_metadata: Optional[ThreadMetadataResponse] = None + message_count: StrictInt + member_count: StrictInt + total_message_sent: StrictInt + applied_tags: Optional[List[Annotated[str, Field(strict=True)]]] = None + member: Optional[ThreadMemberResponse] = None + __properties: ClassVar[List[str]] = ["id", "type", "last_message_id", "flags", "last_pin_timestamp", "guild_id", "name", "parent_id", "rate_limit_per_user", "bitrate", "user_limit", "rtc_region", "video_quality_mode", "permissions", "owner_id", "thread_metadata", "message_count", "member_count", "total_message_sent", "applied_tags", "member"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('last_message_id') + def last_message_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('owner_id') + def owner_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreadResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of thread_metadata + if self.thread_metadata: + _dict['thread_metadata'] = self.thread_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # set to None if last_pin_timestamp (nullable) is None + # and model_fields_set contains the field + if self.last_pin_timestamp is None and "last_pin_timestamp" in self.model_fields_set: + _dict['last_pin_timestamp'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if permissions (nullable) is None + # and model_fields_set contains the field + if self.permissions is None and "permissions" in self.model_fields_set: + _dict['permissions'] = None + + # set to None if thread_metadata (nullable) is None + # and model_fields_set contains the field + if self.thread_metadata is None and "thread_metadata" in self.model_fields_set: + _dict['thread_metadata'] = None + + # set to None if applied_tags (nullable) is None + # and model_fields_set contains the field + if self.applied_tags is None and "applied_tags" in self.model_fields_set: + _dict['applied_tags'] = None + + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreadResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThreadResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "last_message_id": obj.get("last_message_id"), + "flags": obj.get("flags"), + "last_pin_timestamp": obj.get("last_pin_timestamp"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "permissions": obj.get("permissions"), + "owner_id": obj.get("owner_id"), + "thread_metadata": ThreadMetadataResponse.from_dict(obj["thread_metadata"]) if obj.get("thread_metadata") is not None else None, + "message_count": obj.get("message_count"), + "member_count": obj.get("member_count"), + "total_message_sent": obj.get("total_message_sent"), + "applied_tags": obj.get("applied_tags"), + "member": ThreadMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/thread_search_response.py b/dc_rest/models/thread_search_response.py new file mode 100644 index 0000000..05ef4f9 --- /dev/null +++ b/dc_rest/models/thread_search_response.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_response import MessageResponse +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_response import ThreadResponse +from typing import Optional, Set +from typing_extensions import Self + +class ThreadSearchResponse(BaseModel): + """ + ThreadSearchResponse + """ # noqa: E501 + threads: List[ThreadResponse] + members: List[ThreadMemberResponse] + has_more: Optional[StrictBool] = None + first_messages: Optional[List[MessageResponse]] = None + total_results: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["threads", "members", "has_more", "first_messages", "total_results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreadSearchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in threads (list) + _items = [] + if self.threads: + for _item_threads in self.threads: + if _item_threads: + _items.append(_item_threads.to_dict()) + _dict['threads'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in first_messages (list) + _items = [] + if self.first_messages: + for _item_first_messages in self.first_messages: + if _item_first_messages: + _items.append(_item_first_messages.to_dict()) + _dict['first_messages'] = _items + # set to None if has_more (nullable) is None + # and model_fields_set contains the field + if self.has_more is None and "has_more" in self.model_fields_set: + _dict['has_more'] = None + + # set to None if first_messages (nullable) is None + # and model_fields_set contains the field + if self.first_messages is None and "first_messages" in self.model_fields_set: + _dict['first_messages'] = None + + # set to None if total_results (nullable) is None + # and model_fields_set contains the field + if self.total_results is None and "total_results" in self.model_fields_set: + _dict['total_results'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreadSearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThreadSearchResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "threads": [ThreadResponse.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None, + "members": [ThreadMemberResponse.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "has_more": obj.get("has_more"), + "first_messages": [MessageResponse.from_dict(_item) for _item in obj["first_messages"]] if obj.get("first_messages") is not None else None, + "total_results": obj.get("total_results") + }) + return _obj + + diff --git a/dc_rest/models/thread_search_tag_parameter.py b/dc_rest/models/thread_search_tag_parameter.py new file mode 100644 index 0000000..20272ee --- /dev/null +++ b/dc_rest/models/thread_search_tag_parameter.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +THREADSEARCHTAGPARAMETER_ONE_OF_SCHEMAS = ["List[str]", "str"] + +class ThreadSearchTagParameter(BaseModel): + """ + ThreadSearchTagParameter + """ + # data type: str + oneof_schema_1_validator: Optional[StrictStr] = None + # data type: List[str] + oneof_schema_2_validator: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = None + actual_instance: Optional[Union[List[str], str]] = None + one_of_schemas: Set[str] = { "List[str]", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ThreadSearchTagParameter.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ThreadSearchTagParameter with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ThreadSearchTagParameter with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ThreadSearchTagParameter with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ThreadSearchTagParameter with oneOf schemas: List[str], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[str], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/threads_response.py b/dc_rest/models/threads_response.py new file mode 100644 index 0000000..f3a80fe --- /dev/null +++ b/dc_rest/models/threads_response.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_response import MessageResponse +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.models.thread_response import ThreadResponse +from typing import Optional, Set +from typing_extensions import Self + +class ThreadsResponse(BaseModel): + """ + ThreadsResponse + """ # noqa: E501 + threads: List[ThreadResponse] + members: List[ThreadMemberResponse] + has_more: Optional[StrictBool] = None + first_messages: Optional[List[MessageResponse]] = None + __properties: ClassVar[List[str]] = ["threads", "members", "has_more", "first_messages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThreadsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in threads (list) + _items = [] + if self.threads: + for _item_threads in self.threads: + if _item_threads: + _items.append(_item_threads.to_dict()) + _dict['threads'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in first_messages (list) + _items = [] + if self.first_messages: + for _item_first_messages in self.first_messages: + if _item_first_messages: + _items.append(_item_first_messages.to_dict()) + _dict['first_messages'] = _items + # set to None if has_more (nullable) is None + # and model_fields_set contains the field + if self.has_more is None and "has_more" in self.model_fields_set: + _dict['has_more'] = None + + # set to None if first_messages (nullable) is None + # and model_fields_set contains the field + if self.first_messages is None and "first_messages" in self.model_fields_set: + _dict['first_messages'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThreadsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThreadsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "threads": [ThreadResponse.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None, + "members": [ThreadMemberResponse.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "has_more": obj.get("has_more"), + "first_messages": [MessageResponse.from_dict(_item) for _item in obj["first_messages"]] if obj.get("first_messages") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/thumbnail_component_for_message_request.py b/dc_rest/models/thumbnail_component_for_message_request.py new file mode 100644 index 0000000..8dab9ad --- /dev/null +++ b/dc_rest/models/thumbnail_component_for_message_request.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest +from typing import Optional, Set +from typing_extensions import Self + +class ThumbnailComponentForMessageRequest(BaseModel): + """ + ThumbnailComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1024)]] = None + spoiler: Optional[StrictBool] = None + media: UnfurledMediaRequest + __properties: ClassVar[List[str]] = ["type", "description", "spoiler", "media"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThumbnailComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of media + if self.media: + _dict['media'] = self.media.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if spoiler (nullable) is None + # and model_fields_set contains the field + if self.spoiler is None and "spoiler" in self.model_fields_set: + _dict['spoiler'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThumbnailComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThumbnailComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "description": obj.get("description"), + "spoiler": obj.get("spoiler"), + "media": UnfurledMediaRequest.from_dict(obj["media"]) if obj.get("media") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/thumbnail_component_response.py b/dc_rest/models/thumbnail_component_response.py new file mode 100644 index 0000000..76d6e07 --- /dev/null +++ b/dc_rest/models/thumbnail_component_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse +from typing import Optional, Set +from typing_extensions import Self + +class ThumbnailComponentResponse(BaseModel): + """ + ThumbnailComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + media: UnfurledMediaResponse + description: Optional[StrictStr] = None + spoiler: StrictBool + __properties: ClassVar[List[str]] = ["type", "id", "media", "description", "spoiler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ThumbnailComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of media + if self.media: + _dict['media'] = self.media.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ThumbnailComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ThumbnailComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "media": UnfurledMediaResponse.from_dict(obj["media"]) if obj.get("media") is not None else None, + "description": obj.get("description"), + "spoiler": obj.get("spoiler") + }) + return _obj + + diff --git a/dc_rest/models/unfurled_media_request.py b/dc_rest/models/unfurled_media_request.py new file mode 100644 index 0000000..6aaa43c --- /dev/null +++ b/dc_rest/models/unfurled_media_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UnfurledMediaRequest(BaseModel): + """ + UnfurledMediaRequest + """ # noqa: E501 + url: Annotated[str, Field(strict=True, max_length=2048)] + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnfurledMediaRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnfurledMediaRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UnfurledMediaRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/unfurled_media_request_with_attachment_reference_required.py b/dc_rest/models/unfurled_media_request_with_attachment_reference_required.py new file mode 100644 index 0000000..4366b22 --- /dev/null +++ b/dc_rest/models/unfurled_media_request_with_attachment_reference_required.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UnfurledMediaRequestWithAttachmentReferenceRequired(BaseModel): + """ + UnfurledMediaRequestWithAttachmentReferenceRequired + """ # noqa: E501 + url: Annotated[str, Field(strict=True, max_length=2048)] + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnfurledMediaRequestWithAttachmentReferenceRequired from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnfurledMediaRequestWithAttachmentReferenceRequired from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UnfurledMediaRequestWithAttachmentReferenceRequired) in the input: " + _key) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + return _obj + + diff --git a/dc_rest/models/unfurled_media_response.py b/dc_rest/models/unfurled_media_response.py new file mode 100644 index 0000000..428b266 --- /dev/null +++ b/dc_rest/models/unfurled_media_response.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UnfurledMediaResponse(BaseModel): + """ + UnfurledMediaResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + url: StrictStr + proxy_url: StrictStr + width: Optional[StrictInt] = None + height: Optional[StrictInt] = None + content_type: Optional[StrictStr] = None + attachment_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "url", "proxy_url", "width", "height", "content_type", "attachment_id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('attachment_id') + def attachment_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnfurledMediaResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if width (nullable) is None + # and model_fields_set contains the field + if self.width is None and "width" in self.model_fields_set: + _dict['width'] = None + + # set to None if height (nullable) is None + # and model_fields_set contains the field + if self.height is None and "height" in self.model_fields_set: + _dict['height'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnfurledMediaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UnfurledMediaResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url"), + "proxy_url": obj.get("proxy_url"), + "width": obj.get("width"), + "height": obj.get("height"), + "content_type": obj.get("content_type"), + "attachment_id": obj.get("attachment_id") + }) + return _obj + + diff --git a/dc_rest/models/update_application_emoji_request.py b/dc_rest/models/update_application_emoji_request.py new file mode 100644 index 0000000..7410ffb --- /dev/null +++ b/dc_rest/models/update_application_emoji_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateApplicationEmojiRequest(BaseModel): + """ + UpdateApplicationEmojiRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=32)]] = None + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateApplicationEmojiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateApplicationEmojiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateApplicationEmojiRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/update_application_user_role_connection_request.py b/dc_rest/models/update_application_user_role_connection_request.py new file mode 100644 index 0000000..bfa140e --- /dev/null +++ b/dc_rest/models/update_application_user_role_connection_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateApplicationUserRoleConnectionRequest(BaseModel): + """ + UpdateApplicationUserRoleConnectionRequest + """ # noqa: E501 + platform_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None + platform_username: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + metadata: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=100)]]] = None + __properties: ClassVar[List[str]] = ["platform_name", "platform_username", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateApplicationUserRoleConnectionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if platform_name (nullable) is None + # and model_fields_set contains the field + if self.platform_name is None and "platform_name" in self.model_fields_set: + _dict['platform_name'] = None + + # set to None if platform_username (nullable) is None + # and model_fields_set contains the field + if self.platform_username is None and "platform_username" in self.model_fields_set: + _dict['platform_username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateApplicationUserRoleConnectionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateApplicationUserRoleConnectionRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "platform_name": obj.get("platform_name"), + "platform_username": obj.get("platform_username"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/dc_rest/models/update_auto_moderation_rule_request.py b/dc_rest/models/update_auto_moderation_rule_request.py new file mode 100644 index 0000000..b51658d --- /dev/null +++ b/dc_rest/models/update_auto_moderation_rule_request.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial +from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial +from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial +from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +UPDATEAUTOMODERATIONRULEREQUEST_ANY_OF_SCHEMAS = ["DefaultKeywordListUpsertRequestPartial", "KeywordUpsertRequestPartial", "MLSpamUpsertRequestPartial", "MentionSpamUpsertRequestPartial"] + +class UpdateAutoModerationRuleRequest(BaseModel): + """ + UpdateAutoModerationRuleRequest + """ + + # data type: DefaultKeywordListUpsertRequestPartial + anyof_schema_1_validator: Optional[DefaultKeywordListUpsertRequestPartial] = None + # data type: KeywordUpsertRequestPartial + anyof_schema_2_validator: Optional[KeywordUpsertRequestPartial] = None + # data type: MLSpamUpsertRequestPartial + anyof_schema_3_validator: Optional[MLSpamUpsertRequestPartial] = None + # data type: MentionSpamUpsertRequestPartial + anyof_schema_4_validator: Optional[MentionSpamUpsertRequestPartial] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[DefaultKeywordListUpsertRequestPartial, KeywordUpsertRequestPartial, MLSpamUpsertRequestPartial, MentionSpamUpsertRequestPartial]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "DefaultKeywordListUpsertRequestPartial", "KeywordUpsertRequestPartial", "MLSpamUpsertRequestPartial", "MentionSpamUpsertRequestPartial" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = UpdateAutoModerationRuleRequest.model_construct() + error_messages = [] + # validate data type: DefaultKeywordListUpsertRequestPartial + if not isinstance(v, DefaultKeywordListUpsertRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultKeywordListUpsertRequestPartial`") + else: + return v + + # validate data type: KeywordUpsertRequestPartial + if not isinstance(v, KeywordUpsertRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `KeywordUpsertRequestPartial`") + else: + return v + + # validate data type: MLSpamUpsertRequestPartial + if not isinstance(v, MLSpamUpsertRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `MLSpamUpsertRequestPartial`") + else: + return v + + # validate data type: MentionSpamUpsertRequestPartial + if not isinstance(v, MentionSpamUpsertRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `MentionSpamUpsertRequestPartial`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in UpdateAutoModerationRuleRequest with anyOf schemas: DefaultKeywordListUpsertRequestPartial, KeywordUpsertRequestPartial, MLSpamUpsertRequestPartial, MentionSpamUpsertRequestPartial. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[DefaultKeywordListUpsertRequestPartial] = None + try: + instance.actual_instance = DefaultKeywordListUpsertRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[KeywordUpsertRequestPartial] = None + try: + instance.actual_instance = KeywordUpsertRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[MLSpamUpsertRequestPartial] = None + try: + instance.actual_instance = MLSpamUpsertRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_4_validator: Optional[MentionSpamUpsertRequestPartial] = None + try: + instance.actual_instance = MentionSpamUpsertRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into UpdateAutoModerationRuleRequest with anyOf schemas: DefaultKeywordListUpsertRequestPartial, KeywordUpsertRequestPartial, MLSpamUpsertRequestPartial, MentionSpamUpsertRequestPartial. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultKeywordListUpsertRequestPartial, KeywordUpsertRequestPartial, MLSpamUpsertRequestPartial, MentionSpamUpsertRequestPartial]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/update_channel_request.py b/dc_rest/models/update_channel_request.py new file mode 100644 index 0000000..eec43d2 --- /dev/null +++ b/dc_rest/models/update_channel_request.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial +from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial +from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial +from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +UPDATECHANNELREQUEST_ANY_OF_SCHEMAS = ["UpdateDMRequestPartial", "UpdateGroupDMRequestPartial", "UpdateGuildChannelRequestPartial", "UpdateThreadRequestPartial"] + +class UpdateChannelRequest(BaseModel): + """ + UpdateChannelRequest + """ + + # data type: UpdateDMRequestPartial + anyof_schema_1_validator: Optional[UpdateDMRequestPartial] = None + # data type: UpdateGroupDMRequestPartial + anyof_schema_2_validator: Optional[UpdateGroupDMRequestPartial] = None + # data type: UpdateGuildChannelRequestPartial + anyof_schema_3_validator: Optional[UpdateGuildChannelRequestPartial] = None + # data type: UpdateThreadRequestPartial + anyof_schema_4_validator: Optional[UpdateThreadRequestPartial] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[UpdateDMRequestPartial, UpdateGroupDMRequestPartial, UpdateGuildChannelRequestPartial, UpdateThreadRequestPartial]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "UpdateDMRequestPartial", "UpdateGroupDMRequestPartial", "UpdateGuildChannelRequestPartial", "UpdateThreadRequestPartial" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = UpdateChannelRequest.model_construct() + error_messages = [] + # validate data type: UpdateDMRequestPartial + if not isinstance(v, UpdateDMRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateDMRequestPartial`") + else: + return v + + # validate data type: UpdateGroupDMRequestPartial + if not isinstance(v, UpdateGroupDMRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateGroupDMRequestPartial`") + else: + return v + + # validate data type: UpdateGuildChannelRequestPartial + if not isinstance(v, UpdateGuildChannelRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateGuildChannelRequestPartial`") + else: + return v + + # validate data type: UpdateThreadRequestPartial + if not isinstance(v, UpdateThreadRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `UpdateThreadRequestPartial`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in UpdateChannelRequest with anyOf schemas: UpdateDMRequestPartial, UpdateGroupDMRequestPartial, UpdateGuildChannelRequestPartial, UpdateThreadRequestPartial. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[UpdateDMRequestPartial] = None + try: + instance.actual_instance = UpdateDMRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[UpdateGroupDMRequestPartial] = None + try: + instance.actual_instance = UpdateGroupDMRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[UpdateGuildChannelRequestPartial] = None + try: + instance.actual_instance = UpdateGuildChannelRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_4_validator: Optional[UpdateThreadRequestPartial] = None + try: + instance.actual_instance = UpdateThreadRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into UpdateChannelRequest with anyOf schemas: UpdateDMRequestPartial, UpdateGroupDMRequestPartial, UpdateGuildChannelRequestPartial, UpdateThreadRequestPartial. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], UpdateDMRequestPartial, UpdateGroupDMRequestPartial, UpdateGuildChannelRequestPartial, UpdateThreadRequestPartial]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/update_default_reaction_emoji_request.py b/dc_rest/models/update_default_reaction_emoji_request.py new file mode 100644 index 0000000..28d9c73 --- /dev/null +++ b/dc_rest/models/update_default_reaction_emoji_request.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDefaultReactionEmojiRequest(BaseModel): + """ + UpdateDefaultReactionEmojiRequest + """ # noqa: E501 + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + __properties: ClassVar[List[str]] = ["emoji_id", "emoji_name"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDefaultReactionEmojiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDefaultReactionEmojiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateDefaultReactionEmojiRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name") + }) + return _obj + + diff --git a/dc_rest/models/update_dm_request_partial.py b/dc_rest/models/update_dm_request_partial.py new file mode 100644 index 0000000..e35112e --- /dev/null +++ b/dc_rest/models/update_dm_request_partial.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDMRequestPartial(BaseModel): + """ + UpdateDMRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=100)]] = None + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDMRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDMRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateDMRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/update_group_dm_request_partial.py b/dc_rest/models/update_group_dm_request_partial.py new file mode 100644 index 0000000..ffe62da --- /dev/null +++ b/dc_rest/models/update_group_dm_request_partial.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGroupDMRequestPartial(BaseModel): + """ + UpdateGroupDMRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=100)]] = None + icon: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "icon"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGroupDMRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGroupDMRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGroupDMRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "icon": obj.get("icon") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_channel_request_partial.py b/dc_rest/models/update_guild_channel_request_partial.py new file mode 100644 index 0000000..4681362 --- /dev/null +++ b/dc_rest/models/update_guild_channel_request_partial.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest +from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildChannelRequestPartial(BaseModel): + """ + UpdateGuildChannelRequestPartial + """ # noqa: E501 + type: Optional[StrictInt] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = None + position: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + topic: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=4096)]] = None + bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None + user_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None + nsfw: Optional[StrictBool] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + permission_overwrites: Optional[Annotated[List[ChannelPermissionOverwriteRequest], Field(max_length=100)]] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + default_auto_archive_duration: Optional[StrictInt] = None + default_reaction_emoji: Optional[UpdateDefaultReactionEmojiRequest] = None + default_thread_rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + default_sort_order: Optional[StrictInt] = None + default_forum_layout: Optional[StrictInt] = None + default_tag_setting: Optional[StrictStr] = None + flags: Optional[StrictInt] = None + available_tags: Optional[Annotated[List[UpdateThreadTagRequest], Field(max_length=20)]] = None + __properties: ClassVar[List[str]] = ["type", "name", "position", "topic", "bitrate", "user_limit", "nsfw", "rate_limit_per_user", "parent_id", "permission_overwrites", "rtc_region", "video_quality_mode", "default_auto_archive_duration", "default_reaction_emoji", "default_thread_rate_limit_per_user", "default_sort_order", "default_forum_layout", "default_tag_setting", "flags", "available_tags"] + + @field_validator('parent_id') + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildChannelRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permission_overwrites (list) + _items = [] + if self.permission_overwrites: + for _item_permission_overwrites in self.permission_overwrites: + if _item_permission_overwrites: + _items.append(_item_permission_overwrites.to_dict()) + _dict['permission_overwrites'] = _items + # override the default output from pydantic by calling `to_dict()` of default_reaction_emoji + if self.default_reaction_emoji: + _dict['default_reaction_emoji'] = self.default_reaction_emoji.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in available_tags (list) + _items = [] + if self.available_tags: + for _item_available_tags in self.available_tags: + if _item_available_tags: + _items.append(_item_available_tags.to_dict()) + _dict['available_tags'] = _items + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict['position'] = None + + # set to None if topic (nullable) is None + # and model_fields_set contains the field + if self.topic is None and "topic" in self.model_fields_set: + _dict['topic'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if nsfw (nullable) is None + # and model_fields_set contains the field + if self.nsfw is None and "nsfw" in self.model_fields_set: + _dict['nsfw'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if permission_overwrites (nullable) is None + # and model_fields_set contains the field + if self.permission_overwrites is None and "permission_overwrites" in self.model_fields_set: + _dict['permission_overwrites'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + # set to None if default_reaction_emoji (nullable) is None + # and model_fields_set contains the field + if self.default_reaction_emoji is None and "default_reaction_emoji" in self.model_fields_set: + _dict['default_reaction_emoji'] = None + + # set to None if default_thread_rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.default_thread_rate_limit_per_user is None and "default_thread_rate_limit_per_user" in self.model_fields_set: + _dict['default_thread_rate_limit_per_user'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if available_tags (nullable) is None + # and model_fields_set contains the field + if self.available_tags is None and "available_tags" in self.model_fields_set: + _dict['available_tags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildChannelRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildChannelRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "position": obj.get("position"), + "topic": obj.get("topic"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "nsfw": obj.get("nsfw"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "parent_id": obj.get("parent_id"), + "permission_overwrites": [ChannelPermissionOverwriteRequest.from_dict(_item) for _item in obj["permission_overwrites"]] if obj.get("permission_overwrites") is not None else None, + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode"), + "default_auto_archive_duration": obj.get("default_auto_archive_duration"), + "default_reaction_emoji": UpdateDefaultReactionEmojiRequest.from_dict(obj["default_reaction_emoji"]) if obj.get("default_reaction_emoji") is not None else None, + "default_thread_rate_limit_per_user": obj.get("default_thread_rate_limit_per_user"), + "default_sort_order": obj.get("default_sort_order"), + "default_forum_layout": obj.get("default_forum_layout"), + "default_tag_setting": obj.get("default_tag_setting"), + "flags": obj.get("flags"), + "available_tags": [UpdateThreadTagRequest.from_dict(_item) for _item in obj["available_tags"]] if obj.get("available_tags") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/update_guild_emoji_request.py b/dc_rest/models/update_guild_emoji_request.py new file mode 100644 index 0000000..735fe38 --- /dev/null +++ b/dc_rest/models/update_guild_emoji_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildEmojiRequest(BaseModel): + """ + UpdateGuildEmojiRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=32)]] = None + roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None + __properties: ClassVar[List[str]] = ["name", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildEmojiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildEmojiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildEmojiRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "roles": obj.get("roles") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_member_request.py b/dc_rest/models/update_guild_member_request.py new file mode 100644 index 0000000..10e1364 --- /dev/null +++ b/dc_rest/models/update_guild_member_request.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildMemberRequest(BaseModel): + """ + UpdateGuildMemberRequest + """ # noqa: E501 + nick: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None + roles: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=1521)]] = None + mute: Optional[StrictBool] = None + deaf: Optional[StrictBool] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + communication_disabled_until: Optional[datetime] = None + flags: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["nick", "roles", "mute", "deaf", "channel_id", "communication_disabled_until", "flags"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + # set to None if roles (nullable) is None + # and model_fields_set contains the field + if self.roles is None and "roles" in self.model_fields_set: + _dict['roles'] = None + + # set to None if mute (nullable) is None + # and model_fields_set contains the field + if self.mute is None and "mute" in self.model_fields_set: + _dict['mute'] = None + + # set to None if deaf (nullable) is None + # and model_fields_set contains the field + if self.deaf is None and "deaf" in self.model_fields_set: + _dict['deaf'] = None + + # set to None if communication_disabled_until (nullable) is None + # and model_fields_set contains the field + if self.communication_disabled_until is None and "communication_disabled_until" in self.model_fields_set: + _dict['communication_disabled_until'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "nick": obj.get("nick"), + "roles": obj.get("roles"), + "mute": obj.get("mute"), + "deaf": obj.get("deaf"), + "channel_id": obj.get("channel_id"), + "communication_disabled_until": obj.get("communication_disabled_until"), + "flags": obj.get("flags") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_onboarding_request.py b/dc_rest/models/update_guild_onboarding_request.py new file mode 100644 index 0000000..25217fc --- /dev/null +++ b/dc_rest/models/update_guild_onboarding_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildOnboardingRequest(BaseModel): + """ + UpdateGuildOnboardingRequest + """ # noqa: E501 + prompts: Optional[Annotated[List[UpdateOnboardingPromptRequest], Field(max_length=15)]] = None + enabled: Optional[StrictBool] = None + default_channel_ids: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=500)]] = None + mode: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["prompts", "enabled", "default_channel_ids", "mode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildOnboardingRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict['prompts'] = _items + # set to None if prompts (nullable) is None + # and model_fields_set contains the field + if self.prompts is None and "prompts" in self.model_fields_set: + _dict['prompts'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if default_channel_ids (nullable) is None + # and model_fields_set contains the field + if self.default_channel_ids is None and "default_channel_ids" in self.model_fields_set: + _dict['default_channel_ids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildOnboardingRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildOnboardingRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "prompts": [UpdateOnboardingPromptRequest.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None, + "enabled": obj.get("enabled"), + "default_channel_ids": obj.get("default_channel_ids"), + "mode": obj.get("mode") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_scheduled_event_request.py b/dc_rest/models/update_guild_scheduled_event_request.py new file mode 100644 index 0000000..94c0fd7 --- /dev/null +++ b/dc_rest/models/update_guild_scheduled_event_request.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial +from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial +from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +UPDATEGUILDSCHEDULEDEVENTREQUEST_ANY_OF_SCHEMAS = ["ExternalScheduledEventPatchRequestPartial", "StageScheduledEventPatchRequestPartial", "VoiceScheduledEventPatchRequestPartial"] + +class UpdateGuildScheduledEventRequest(BaseModel): + """ + UpdateGuildScheduledEventRequest + """ + + # data type: ExternalScheduledEventPatchRequestPartial + anyof_schema_1_validator: Optional[ExternalScheduledEventPatchRequestPartial] = None + # data type: StageScheduledEventPatchRequestPartial + anyof_schema_2_validator: Optional[StageScheduledEventPatchRequestPartial] = None + # data type: VoiceScheduledEventPatchRequestPartial + anyof_schema_3_validator: Optional[VoiceScheduledEventPatchRequestPartial] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[ExternalScheduledEventPatchRequestPartial, StageScheduledEventPatchRequestPartial, VoiceScheduledEventPatchRequestPartial]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "ExternalScheduledEventPatchRequestPartial", "StageScheduledEventPatchRequestPartial", "VoiceScheduledEventPatchRequestPartial" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = UpdateGuildScheduledEventRequest.model_construct() + error_messages = [] + # validate data type: ExternalScheduledEventPatchRequestPartial + if not isinstance(v, ExternalScheduledEventPatchRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExternalScheduledEventPatchRequestPartial`") + else: + return v + + # validate data type: StageScheduledEventPatchRequestPartial + if not isinstance(v, StageScheduledEventPatchRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `StageScheduledEventPatchRequestPartial`") + else: + return v + + # validate data type: VoiceScheduledEventPatchRequestPartial + if not isinstance(v, VoiceScheduledEventPatchRequestPartial): + error_messages.append(f"Error! Input type `{type(v)}` is not `VoiceScheduledEventPatchRequestPartial`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in UpdateGuildScheduledEventRequest with anyOf schemas: ExternalScheduledEventPatchRequestPartial, StageScheduledEventPatchRequestPartial, VoiceScheduledEventPatchRequestPartial. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[ExternalScheduledEventPatchRequestPartial] = None + try: + instance.actual_instance = ExternalScheduledEventPatchRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[StageScheduledEventPatchRequestPartial] = None + try: + instance.actual_instance = StageScheduledEventPatchRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[VoiceScheduledEventPatchRequestPartial] = None + try: + instance.actual_instance = VoiceScheduledEventPatchRequestPartial.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into UpdateGuildScheduledEventRequest with anyOf schemas: ExternalScheduledEventPatchRequestPartial, StageScheduledEventPatchRequestPartial, VoiceScheduledEventPatchRequestPartial. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExternalScheduledEventPatchRequestPartial, StageScheduledEventPatchRequestPartial, VoiceScheduledEventPatchRequestPartial]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/dc_rest/models/update_guild_sticker_request.py b/dc_rest/models/update_guild_sticker_request.py new file mode 100644 index 0000000..9148764 --- /dev/null +++ b/dc_rest/models/update_guild_sticker_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildStickerRequest(BaseModel): + """ + UpdateGuildStickerRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=30)]] = None + tags: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + __properties: ClassVar[List[str]] = ["name", "tags", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildStickerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildStickerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildStickerRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "tags": obj.get("tags"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_template_request.py b/dc_rest/models/update_guild_template_request.py new file mode 100644 index 0000000..7b3eb97 --- /dev/null +++ b/dc_rest/models/update_guild_template_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildTemplateRequest(BaseModel): + """ + UpdateGuildTemplateRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=120)]] = None + __properties: ClassVar[List[str]] = ["name", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildTemplateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildTemplateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dc_rest/models/update_guild_widget_settings_request.py b/dc_rest/models/update_guild_widget_settings_request.py new file mode 100644 index 0000000..8d5dc48 --- /dev/null +++ b/dc_rest/models/update_guild_widget_settings_request.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateGuildWidgetSettingsRequest(BaseModel): + """ + UpdateGuildWidgetSettingsRequest + """ # noqa: E501 + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + enabled: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["channel_id", "enabled"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateGuildWidgetSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateGuildWidgetSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateGuildWidgetSettingsRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/dc_rest/models/update_message_interaction_callback_request.py b/dc_rest/models/update_message_interaction_callback_request.py new file mode 100644 index 0000000..2c5bd97 --- /dev/null +++ b/dc_rest/models/update_message_interaction_callback_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial +from typing import Optional, Set +from typing_extensions import Self + +class UpdateMessageInteractionCallbackRequest(BaseModel): + """ + UpdateMessageInteractionCallbackRequest + """ # noqa: E501 + type: Optional[StrictInt] + data: Optional[IncomingWebhookUpdateForInteractionCallbackRequestPartial] = None + __properties: ClassVar[List[str]] = ["type", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateMessageInteractionCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateMessageInteractionCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateMessageInteractionCallbackRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "data": IncomingWebhookUpdateForInteractionCallbackRequestPartial.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/update_message_interaction_callback_response.py b/dc_rest/models/update_message_interaction_callback_response.py new file mode 100644 index 0000000..0cdcd67 --- /dev/null +++ b/dc_rest/models/update_message_interaction_callback_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.message_response import MessageResponse +from typing import Optional, Set +from typing_extensions import Self + +class UpdateMessageInteractionCallbackResponse(BaseModel): + """ + UpdateMessageInteractionCallbackResponse + """ # noqa: E501 + type: Optional[StrictInt] + message: MessageResponse + __properties: ClassVar[List[str]] = ["type", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateMessageInteractionCallbackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of message + if self.message: + _dict['message'] = self.message.to_dict() + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateMessageInteractionCallbackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateMessageInteractionCallbackResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "message": MessageResponse.from_dict(obj["message"]) if obj.get("message") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/update_my_guild_member_request.py b/dc_rest/models/update_my_guild_member_request.py new file mode 100644 index 0000000..e767710 --- /dev/null +++ b/dc_rest/models/update_my_guild_member_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateMyGuildMemberRequest(BaseModel): + """ + UpdateMyGuildMemberRequest + """ # noqa: E501 + nick: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None + __properties: ClassVar[List[str]] = ["nick"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateMyGuildMemberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick (nullable) is None + # and model_fields_set contains the field + if self.nick is None and "nick" in self.model_fields_set: + _dict['nick'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateMyGuildMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateMyGuildMemberRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "nick": obj.get("nick") + }) + return _obj + + diff --git a/dc_rest/models/update_onboarding_prompt_request.py b/dc_rest/models/update_onboarding_prompt_request.py new file mode 100644 index 0000000..6ddd83b --- /dev/null +++ b/dc_rest/models/update_onboarding_prompt_request.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOnboardingPromptRequest(BaseModel): + """ + UpdateOnboardingPromptRequest + """ # noqa: E501 + title: Annotated[str, Field(min_length=1, strict=True, max_length=100)] + options: Annotated[List[OnboardingPromptOptionRequest], Field(min_length=1, max_length=50)] + single_select: Optional[StrictBool] = None + required: Optional[StrictBool] = None + in_onboarding: Optional[StrictBool] = None + type: Optional[StrictInt] = None + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["title", "options", "single_select", "required", "in_onboarding", "type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOnboardingPromptRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in options (list) + _items = [] + if self.options: + for _item_options in self.options: + if _item_options: + _items.append(_item_options.to_dict()) + _dict['options'] = _items + # set to None if single_select (nullable) is None + # and model_fields_set contains the field + if self.single_select is None and "single_select" in self.model_fields_set: + _dict['single_select'] = None + + # set to None if required (nullable) is None + # and model_fields_set contains the field + if self.required is None and "required" in self.model_fields_set: + _dict['required'] = None + + # set to None if in_onboarding (nullable) is None + # and model_fields_set contains the field + if self.in_onboarding is None and "in_onboarding" in self.model_fields_set: + _dict['in_onboarding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOnboardingPromptRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateOnboardingPromptRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "options": [OnboardingPromptOptionRequest.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None, + "single_select": obj.get("single_select"), + "required": obj.get("required"), + "in_onboarding": obj.get("in_onboarding"), + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/update_self_voice_state_request.py b/dc_rest/models/update_self_voice_state_request.py new file mode 100644 index 0000000..5aefd92 --- /dev/null +++ b/dc_rest/models/update_self_voice_state_request.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSelfVoiceStateRequest(BaseModel): + """ + UpdateSelfVoiceStateRequest + """ # noqa: E501 + request_to_speak_timestamp: Optional[datetime] = None + suppress: Optional[StrictBool] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["request_to_speak_timestamp", "suppress", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateSelfVoiceStateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if request_to_speak_timestamp (nullable) is None + # and model_fields_set contains the field + if self.request_to_speak_timestamp is None and "request_to_speak_timestamp" in self.model_fields_set: + _dict['request_to_speak_timestamp'] = None + + # set to None if suppress (nullable) is None + # and model_fields_set contains the field + if self.suppress is None and "suppress" in self.model_fields_set: + _dict['suppress'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateSelfVoiceStateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateSelfVoiceStateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "request_to_speak_timestamp": obj.get("request_to_speak_timestamp"), + "suppress": obj.get("suppress"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/update_stage_instance_request.py b/dc_rest/models/update_stage_instance_request.py new file mode 100644 index 0000000..d3acff9 --- /dev/null +++ b/dc_rest/models/update_stage_instance_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateStageInstanceRequest(BaseModel): + """ + UpdateStageInstanceRequest + """ # noqa: E501 + topic: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=120)]] = None + privacy_level: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["topic", "privacy_level"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateStageInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateStageInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateStageInstanceRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "topic": obj.get("topic"), + "privacy_level": obj.get("privacy_level") + }) + return _obj + + diff --git a/dc_rest/models/update_thread_request_partial.py b/dc_rest/models/update_thread_request_partial.py new file mode 100644 index 0000000..950aa50 --- /dev/null +++ b/dc_rest/models/update_thread_request_partial.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateThreadRequestPartial(BaseModel): + """ + UpdateThreadRequestPartial + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=100)]] = None + archived: Optional[StrictBool] = None + locked: Optional[StrictBool] = None + invitable: Optional[StrictBool] = None + auto_archive_duration: Optional[StrictInt] = None + rate_limit_per_user: Optional[Annotated[int, Field(le=21600, strict=True, ge=0)]] = None + flags: Optional[StrictInt] = None + applied_tags: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=5)]] = None + bitrate: Optional[Annotated[int, Field(strict=True, ge=8000)]] = None + user_limit: Optional[Annotated[int, Field(le=99, strict=True, ge=0)]] = None + rtc_region: Optional[StrictStr] = None + video_quality_mode: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["name", "archived", "locked", "invitable", "auto_archive_duration", "rate_limit_per_user", "flags", "applied_tags", "bitrate", "user_limit", "rtc_region", "video_quality_mode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateThreadRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if archived (nullable) is None + # and model_fields_set contains the field + if self.archived is None and "archived" in self.model_fields_set: + _dict['archived'] = None + + # set to None if locked (nullable) is None + # and model_fields_set contains the field + if self.locked is None and "locked" in self.model_fields_set: + _dict['locked'] = None + + # set to None if invitable (nullable) is None + # and model_fields_set contains the field + if self.invitable is None and "invitable" in self.model_fields_set: + _dict['invitable'] = None + + # set to None if rate_limit_per_user (nullable) is None + # and model_fields_set contains the field + if self.rate_limit_per_user is None and "rate_limit_per_user" in self.model_fields_set: + _dict['rate_limit_per_user'] = None + + # set to None if flags (nullable) is None + # and model_fields_set contains the field + if self.flags is None and "flags" in self.model_fields_set: + _dict['flags'] = None + + # set to None if applied_tags (nullable) is None + # and model_fields_set contains the field + if self.applied_tags is None and "applied_tags" in self.model_fields_set: + _dict['applied_tags'] = None + + # set to None if bitrate (nullable) is None + # and model_fields_set contains the field + if self.bitrate is None and "bitrate" in self.model_fields_set: + _dict['bitrate'] = None + + # set to None if user_limit (nullable) is None + # and model_fields_set contains the field + if self.user_limit is None and "user_limit" in self.model_fields_set: + _dict['user_limit'] = None + + # set to None if rtc_region (nullable) is None + # and model_fields_set contains the field + if self.rtc_region is None and "rtc_region" in self.model_fields_set: + _dict['rtc_region'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateThreadRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateThreadRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "archived": obj.get("archived"), + "locked": obj.get("locked"), + "invitable": obj.get("invitable"), + "auto_archive_duration": obj.get("auto_archive_duration"), + "rate_limit_per_user": obj.get("rate_limit_per_user"), + "flags": obj.get("flags"), + "applied_tags": obj.get("applied_tags"), + "bitrate": obj.get("bitrate"), + "user_limit": obj.get("user_limit"), + "rtc_region": obj.get("rtc_region"), + "video_quality_mode": obj.get("video_quality_mode") + }) + return _obj + + diff --git a/dc_rest/models/update_thread_tag_request.py b/dc_rest/models/update_thread_tag_request.py new file mode 100644 index 0000000..5c1d178 --- /dev/null +++ b/dc_rest/models/update_thread_tag_request.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateThreadTagRequest(BaseModel): + """ + UpdateThreadTagRequest + """ # noqa: E501 + name: Annotated[str, Field(min_length=0, strict=True, max_length=20)] + emoji_id: Optional[Annotated[str, Field(strict=True)]] = None + emoji_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + moderated: Optional[StrictBool] = None + id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["name", "emoji_id", "emoji_name", "moderated", "id"] + + @field_validator('emoji_id') + def emoji_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateThreadTagRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if emoji_name (nullable) is None + # and model_fields_set contains the field + if self.emoji_name is None and "emoji_name" in self.model_fields_set: + _dict['emoji_name'] = None + + # set to None if moderated (nullable) is None + # and model_fields_set contains the field + if self.moderated is None and "moderated" in self.model_fields_set: + _dict['moderated'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateThreadTagRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateThreadTagRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "emoji_id": obj.get("emoji_id"), + "emoji_name": obj.get("emoji_name"), + "moderated": obj.get("moderated"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/update_voice_state_request.py b/dc_rest/models/update_voice_state_request.py new file mode 100644 index 0000000..d534f51 --- /dev/null +++ b/dc_rest/models/update_voice_state_request.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateVoiceStateRequest(BaseModel): + """ + UpdateVoiceStateRequest + """ # noqa: E501 + suppress: Optional[StrictBool] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["suppress", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateVoiceStateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if suppress (nullable) is None + # and model_fields_set contains the field + if self.suppress is None and "suppress" in self.model_fields_set: + _dict['suppress'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateVoiceStateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateVoiceStateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "suppress": obj.get("suppress"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/update_webhook_by_token_request.py b/dc_rest/models/update_webhook_by_token_request.py new file mode 100644 index 0000000..8d83c6a --- /dev/null +++ b/dc_rest/models/update_webhook_by_token_request.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateWebhookByTokenRequest(BaseModel): + """ + UpdateWebhookByTokenRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = None + avatar: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name", "avatar"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateWebhookByTokenRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateWebhookByTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateWebhookByTokenRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "avatar": obj.get("avatar") + }) + return _obj + + diff --git a/dc_rest/models/update_webhook_request.py b/dc_rest/models/update_webhook_request.py new file mode 100644 index 0000000..ea9bb80 --- /dev/null +++ b/dc_rest/models/update_webhook_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateWebhookRequest(BaseModel): + """ + UpdateWebhookRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = None + avatar: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["name", "avatar", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateWebhookRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateWebhookRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UpdateWebhookRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "avatar": obj.get("avatar"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/user_avatar_decoration_response.py b/dc_rest/models/user_avatar_decoration_response.py new file mode 100644 index 0000000..c74e828 --- /dev/null +++ b/dc_rest/models/user_avatar_decoration_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserAvatarDecorationResponse(BaseModel): + """ + UserAvatarDecorationResponse + """ # noqa: E501 + asset: StrictStr + sku_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["asset", "sku_id"] + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAvatarDecorationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAvatarDecorationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserAvatarDecorationResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "sku_id": obj.get("sku_id") + }) + return _obj + + diff --git a/dc_rest/models/user_collectibles_response.py b/dc_rest/models/user_collectibles_response.py new file mode 100644 index 0000000..ec2715c --- /dev/null +++ b/dc_rest/models/user_collectibles_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.user_nameplate_response import UserNameplateResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserCollectiblesResponse(BaseModel): + """ + UserCollectiblesResponse + """ # noqa: E501 + nameplate: Optional[UserNameplateResponse] = None + __properties: ClassVar[List[str]] = ["nameplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCollectiblesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of nameplate + if self.nameplate: + _dict['nameplate'] = self.nameplate.to_dict() + # set to None if nameplate (nullable) is None + # and model_fields_set contains the field + if self.nameplate is None and "nameplate" in self.model_fields_set: + _dict['nameplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCollectiblesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserCollectiblesResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "nameplate": UserNameplateResponse.from_dict(obj["nameplate"]) if obj.get("nameplate") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_communication_disabled_action.py b/dc_rest/models/user_communication_disabled_action.py new file mode 100644 index 0000000..f83be3e --- /dev/null +++ b/dc_rest/models/user_communication_disabled_action.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata +from typing import Optional, Set +from typing_extensions import Self + +class UserCommunicationDisabledAction(BaseModel): + """ + UserCommunicationDisabledAction + """ # noqa: E501 + type: StrictInt + metadata: UserCommunicationDisabledActionMetadata + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserCommunicationDisabledAction) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": UserCommunicationDisabledActionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_communication_disabled_action_metadata.py b/dc_rest/models/user_communication_disabled_action_metadata.py new file mode 100644 index 0000000..26a0a8a --- /dev/null +++ b/dc_rest/models/user_communication_disabled_action_metadata.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserCommunicationDisabledActionMetadata(BaseModel): + """ + UserCommunicationDisabledActionMetadata + """ # noqa: E501 + duration_seconds: Optional[Annotated[int, Field(le=2419200, strict=True, ge=0)]] = None + __properties: ClassVar[List[str]] = ["duration_seconds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if duration_seconds (nullable) is None + # and model_fields_set contains the field + if self.duration_seconds is None and "duration_seconds" in self.model_fields_set: + _dict['duration_seconds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserCommunicationDisabledActionMetadata) in the input: " + _key) + + _obj = cls.model_validate({ + "duration_seconds": obj.get("duration_seconds") + }) + return _obj + + diff --git a/dc_rest/models/user_communication_disabled_action_metadata_response.py b/dc_rest/models/user_communication_disabled_action_metadata_response.py new file mode 100644 index 0000000..cefe4ee --- /dev/null +++ b/dc_rest/models/user_communication_disabled_action_metadata_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserCommunicationDisabledActionMetadataResponse(BaseModel): + """ + UserCommunicationDisabledActionMetadataResponse + """ # noqa: E501 + duration_seconds: StrictInt + __properties: ClassVar[List[str]] = ["duration_seconds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserCommunicationDisabledActionMetadataResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "duration_seconds": obj.get("duration_seconds") + }) + return _obj + + diff --git a/dc_rest/models/user_communication_disabled_action_response.py b/dc_rest/models/user_communication_disabled_action_response.py new file mode 100644 index 0000000..cc28f05 --- /dev/null +++ b/dc_rest/models/user_communication_disabled_action_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserCommunicationDisabledActionResponse(BaseModel): + """ + UserCommunicationDisabledActionResponse + """ # noqa: E501 + type: StrictInt + metadata: UserCommunicationDisabledActionMetadataResponse + __properties: ClassVar[List[str]] = ["type", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunicationDisabledActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserCommunicationDisabledActionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "metadata": UserCommunicationDisabledActionMetadataResponse.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_guild_onboarding_response.py b/dc_rest/models/user_guild_onboarding_response.py new file mode 100644 index 0000000..da38f26 --- /dev/null +++ b/dc_rest/models/user_guild_onboarding_response.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserGuildOnboardingResponse(BaseModel): + """ + UserGuildOnboardingResponse + """ # noqa: E501 + guild_id: Annotated[str, Field(strict=True)] + prompts: List[OnboardingPromptResponse] + default_channel_ids: List[Annotated[str, Field(strict=True)]] + enabled: StrictBool + __properties: ClassVar[List[str]] = ["guild_id", "prompts", "default_channel_ids", "enabled"] + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserGuildOnboardingResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict['prompts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserGuildOnboardingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserGuildOnboardingResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "guild_id": obj.get("guild_id"), + "prompts": [OnboardingPromptResponse.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None, + "default_channel_ids": obj.get("default_channel_ids"), + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/dc_rest/models/user_nameplate_response.py b/dc_rest/models/user_nameplate_response.py new file mode 100644 index 0000000..6cac4a7 --- /dev/null +++ b/dc_rest/models/user_nameplate_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserNameplateResponse(BaseModel): + """ + UserNameplateResponse + """ # noqa: E501 + sku_id: Optional[Annotated[str, Field(strict=True)]] = None + asset: Optional[StrictStr] = None + label: Optional[StrictStr] = None + palette: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["sku_id", "asset", "label", "palette"] + + @field_validator('sku_id') + def sku_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserNameplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if asset (nullable) is None + # and model_fields_set contains the field + if self.asset is None and "asset" in self.model_fields_set: + _dict['asset'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserNameplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserNameplateResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "sku_id": obj.get("sku_id"), + "asset": obj.get("asset"), + "label": obj.get("label"), + "palette": obj.get("palette") + }) + return _obj + + diff --git a/dc_rest/models/user_pii_response.py b/dc_rest/models/user_pii_response.py new file mode 100644 index 0000000..d980c5f --- /dev/null +++ b/dc_rest/models/user_pii_response.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserPIIResponse(BaseModel): + """ + UserPIIResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + username: StrictStr + avatar: Optional[StrictStr] = None + discriminator: StrictStr + public_flags: StrictInt + flags: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)] + bot: Optional[StrictBool] = None + system: Optional[StrictBool] = None + banner: Optional[StrictStr] = None + accent_color: Optional[StrictInt] = None + global_name: Optional[StrictStr] = None + avatar_decoration_data: Optional[UserAvatarDecorationResponse] = None + collectibles: Optional[UserCollectiblesResponse] = None + primary_guild: Optional[UserPrimaryGuildResponse] = None + mfa_enabled: StrictBool + locale: StrictStr + premium_type: Optional[StrictInt] = None + email: Optional[StrictStr] = None + verified: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "username", "avatar", "discriminator", "public_flags", "flags", "bot", "system", "banner", "accent_color", "global_name", "avatar_decoration_data", "collectibles", "primary_guild", "mfa_enabled", "locale", "premium_type", "email", "verified"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPIIResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of avatar_decoration_data + if self.avatar_decoration_data: + _dict['avatar_decoration_data'] = self.avatar_decoration_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of collectibles + if self.collectibles: + _dict['collectibles'] = self.collectibles.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_guild + if self.primary_guild: + _dict['primary_guild'] = self.primary_guild.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + # set to None if system (nullable) is None + # and model_fields_set contains the field + if self.system is None and "system" in self.model_fields_set: + _dict['system'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if accent_color (nullable) is None + # and model_fields_set contains the field + if self.accent_color is None and "accent_color" in self.model_fields_set: + _dict['accent_color'] = None + + # set to None if global_name (nullable) is None + # and model_fields_set contains the field + if self.global_name is None and "global_name" in self.model_fields_set: + _dict['global_name'] = None + + # set to None if avatar_decoration_data (nullable) is None + # and model_fields_set contains the field + if self.avatar_decoration_data is None and "avatar_decoration_data" in self.model_fields_set: + _dict['avatar_decoration_data'] = None + + # set to None if collectibles (nullable) is None + # and model_fields_set contains the field + if self.collectibles is None and "collectibles" in self.model_fields_set: + _dict['collectibles'] = None + + # set to None if primary_guild (nullable) is None + # and model_fields_set contains the field + if self.primary_guild is None and "primary_guild" in self.model_fields_set: + _dict['primary_guild'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if verified (nullable) is None + # and model_fields_set contains the field + if self.verified is None and "verified" in self.model_fields_set: + _dict['verified'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPIIResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserPIIResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "username": obj.get("username"), + "avatar": obj.get("avatar"), + "discriminator": obj.get("discriminator"), + "public_flags": obj.get("public_flags"), + "flags": obj.get("flags"), + "bot": obj.get("bot"), + "system": obj.get("system"), + "banner": obj.get("banner"), + "accent_color": obj.get("accent_color"), + "global_name": obj.get("global_name"), + "avatar_decoration_data": UserAvatarDecorationResponse.from_dict(obj["avatar_decoration_data"]) if obj.get("avatar_decoration_data") is not None else None, + "collectibles": UserCollectiblesResponse.from_dict(obj["collectibles"]) if obj.get("collectibles") is not None else None, + "primary_guild": UserPrimaryGuildResponse.from_dict(obj["primary_guild"]) if obj.get("primary_guild") is not None else None, + "mfa_enabled": obj.get("mfa_enabled"), + "locale": obj.get("locale"), + "premium_type": obj.get("premium_type"), + "email": obj.get("email"), + "verified": obj.get("verified") + }) + return _obj + + diff --git a/dc_rest/models/user_primary_guild_response.py b/dc_rest/models/user_primary_guild_response.py new file mode 100644 index 0000000..16d0995 --- /dev/null +++ b/dc_rest/models/user_primary_guild_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserPrimaryGuildResponse(BaseModel): + """ + UserPrimaryGuildResponse + """ # noqa: E501 + identity_guild_id: Optional[Annotated[str, Field(strict=True)]] = None + identity_enabled: Optional[StrictBool] = None + tag: Optional[StrictStr] = None + badge: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity_guild_id", "identity_enabled", "tag", "badge"] + + @field_validator('identity_guild_id') + def identity_guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPrimaryGuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if identity_enabled (nullable) is None + # and model_fields_set contains the field + if self.identity_enabled is None and "identity_enabled" in self.model_fields_set: + _dict['identity_enabled'] = None + + # set to None if tag (nullable) is None + # and model_fields_set contains the field + if self.tag is None and "tag" in self.model_fields_set: + _dict['tag'] = None + + # set to None if badge (nullable) is None + # and model_fields_set contains the field + if self.badge is None and "badge" in self.model_fields_set: + _dict['badge'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPrimaryGuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserPrimaryGuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "identity_guild_id": obj.get("identity_guild_id"), + "identity_enabled": obj.get("identity_enabled"), + "tag": obj.get("tag"), + "badge": obj.get("badge") + }) + return _obj + + diff --git a/dc_rest/models/user_response.py b/dc_rest/models/user_response.py new file mode 100644 index 0000000..d18ca0f --- /dev/null +++ b/dc_rest/models/user_response.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserResponse(BaseModel): + """ + UserResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + username: StrictStr + avatar: Optional[StrictStr] = None + discriminator: StrictStr + public_flags: StrictInt + flags: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)] + bot: Optional[StrictBool] = None + system: Optional[StrictBool] = None + banner: Optional[StrictStr] = None + accent_color: Optional[StrictInt] = None + global_name: Optional[StrictStr] = None + avatar_decoration_data: Optional[UserAvatarDecorationResponse] = None + collectibles: Optional[UserCollectiblesResponse] = None + primary_guild: Optional[UserPrimaryGuildResponse] = None + __properties: ClassVar[List[str]] = ["id", "username", "avatar", "discriminator", "public_flags", "flags", "bot", "system", "banner", "accent_color", "global_name", "avatar_decoration_data", "collectibles", "primary_guild"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of avatar_decoration_data + if self.avatar_decoration_data: + _dict['avatar_decoration_data'] = self.avatar_decoration_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of collectibles + if self.collectibles: + _dict['collectibles'] = self.collectibles.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_guild + if self.primary_guild: + _dict['primary_guild'] = self.primary_guild.to_dict() + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if bot (nullable) is None + # and model_fields_set contains the field + if self.bot is None and "bot" in self.model_fields_set: + _dict['bot'] = None + + # set to None if system (nullable) is None + # and model_fields_set contains the field + if self.system is None and "system" in self.model_fields_set: + _dict['system'] = None + + # set to None if banner (nullable) is None + # and model_fields_set contains the field + if self.banner is None and "banner" in self.model_fields_set: + _dict['banner'] = None + + # set to None if accent_color (nullable) is None + # and model_fields_set contains the field + if self.accent_color is None and "accent_color" in self.model_fields_set: + _dict['accent_color'] = None + + # set to None if global_name (nullable) is None + # and model_fields_set contains the field + if self.global_name is None and "global_name" in self.model_fields_set: + _dict['global_name'] = None + + # set to None if avatar_decoration_data (nullable) is None + # and model_fields_set contains the field + if self.avatar_decoration_data is None and "avatar_decoration_data" in self.model_fields_set: + _dict['avatar_decoration_data'] = None + + # set to None if collectibles (nullable) is None + # and model_fields_set contains the field + if self.collectibles is None and "collectibles" in self.model_fields_set: + _dict['collectibles'] = None + + # set to None if primary_guild (nullable) is None + # and model_fields_set contains the field + if self.primary_guild is None and "primary_guild" in self.model_fields_set: + _dict['primary_guild'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "username": obj.get("username"), + "avatar": obj.get("avatar"), + "discriminator": obj.get("discriminator"), + "public_flags": obj.get("public_flags"), + "flags": obj.get("flags"), + "bot": obj.get("bot"), + "system": obj.get("system"), + "banner": obj.get("banner"), + "accent_color": obj.get("accent_color"), + "global_name": obj.get("global_name"), + "avatar_decoration_data": UserAvatarDecorationResponse.from_dict(obj["avatar_decoration_data"]) if obj.get("avatar_decoration_data") is not None else None, + "collectibles": UserCollectiblesResponse.from_dict(obj["collectibles"]) if obj.get("collectibles") is not None else None, + "primary_guild": UserPrimaryGuildResponse.from_dict(obj["primary_guild"]) if obj.get("primary_guild") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_select_component_for_message_request.py b/dc_rest/models/user_select_component_for_message_request.py new file mode 100644 index 0000000..28de44b --- /dev/null +++ b/dc_rest/models/user_select_component_for_message_request.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.user_select_default_value import UserSelectDefaultValue +from typing import Optional, Set +from typing_extensions import Self + +class UserSelectComponentForMessageRequest(BaseModel): + """ + UserSelectComponentForMessageRequest + """ # noqa: E501 + type: StrictInt + custom_id: Annotated[str, Field(strict=True, max_length=100)] + placeholder: Optional[Annotated[str, Field(strict=True, max_length=150)]] = None + min_values: Optional[Annotated[int, Field(le=25, strict=True, ge=0)]] = None + max_values: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None + disabled: Optional[StrictBool] = None + default_values: Optional[Annotated[List[UserSelectDefaultValue], Field(max_length=25)]] = None + __properties: ClassVar[List[str]] = ["type", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSelectComponentForMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSelectComponentForMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserSelectComponentForMessageRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [UserSelectDefaultValue.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_select_component_response.py b/dc_rest/models/user_select_component_response.py new file mode 100644 index 0000000..2e3216b --- /dev/null +++ b/dc_rest/models/user_select_component_response.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserSelectComponentResponse(BaseModel): + """ + UserSelectComponentResponse + """ # noqa: E501 + type: StrictInt + id: StrictInt + custom_id: StrictStr + placeholder: Optional[StrictStr] = None + min_values: Optional[StrictInt] = None + max_values: Optional[StrictInt] = None + disabled: Optional[StrictBool] = None + default_values: Optional[List[UserSelectDefaultValueResponse]] = None + __properties: ClassVar[List[str]] = ["type", "id", "custom_id", "placeholder", "min_values", "max_values", "disabled", "default_values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSelectComponentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in default_values (list) + _items = [] + if self.default_values: + for _item_default_values in self.default_values: + if _item_default_values: + _items.append(_item_default_values.to_dict()) + _dict['default_values'] = _items + # set to None if placeholder (nullable) is None + # and model_fields_set contains the field + if self.placeholder is None and "placeholder" in self.model_fields_set: + _dict['placeholder'] = None + + # set to None if min_values (nullable) is None + # and model_fields_set contains the field + if self.min_values is None and "min_values" in self.model_fields_set: + _dict['min_values'] = None + + # set to None if max_values (nullable) is None + # and model_fields_set contains the field + if self.max_values is None and "max_values" in self.model_fields_set: + _dict['max_values'] = None + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if default_values (nullable) is None + # and model_fields_set contains the field + if self.default_values is None and "default_values" in self.model_fields_set: + _dict['default_values'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSelectComponentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserSelectComponentResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id"), + "custom_id": obj.get("custom_id"), + "placeholder": obj.get("placeholder"), + "min_values": obj.get("min_values"), + "max_values": obj.get("max_values"), + "disabled": obj.get("disabled"), + "default_values": [UserSelectDefaultValueResponse.from_dict(_item) for _item in obj["default_values"]] if obj.get("default_values") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/user_select_default_value.py b/dc_rest/models/user_select_default_value.py new file mode 100644 index 0000000..24383fd --- /dev/null +++ b/dc_rest/models/user_select_default_value.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserSelectDefaultValue(BaseModel): + """ + UserSelectDefaultValue + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSelectDefaultValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSelectDefaultValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserSelectDefaultValue) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/user_select_default_value_response.py b/dc_rest/models/user_select_default_value_response.py new file mode 100644 index 0000000..ab0e342 --- /dev/null +++ b/dc_rest/models/user_select_default_value_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UserSelectDefaultValueResponse(BaseModel): + """ + UserSelectDefaultValueResponse + """ # noqa: E501 + type: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["type", "id"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSelectDefaultValueResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSelectDefaultValueResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in UserSelectDefaultValueResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "id": obj.get("id") + }) + return _obj + + diff --git a/dc_rest/models/vanity_url_error_response.py b/dc_rest/models/vanity_url_error_response.py new file mode 100644 index 0000000..a2a1148 --- /dev/null +++ b/dc_rest/models/vanity_url_error_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VanityURLErrorResponse(BaseModel): + """ + VanityURLErrorResponse + """ # noqa: E501 + message: StrictStr + code: StrictInt + __properties: ClassVar[List[str]] = ["message", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VanityURLErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VanityURLErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VanityURLErrorResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "code": obj.get("code") + }) + return _obj + + diff --git a/dc_rest/models/vanity_url_response.py b/dc_rest/models/vanity_url_response.py new file mode 100644 index 0000000..0bb90fb --- /dev/null +++ b/dc_rest/models/vanity_url_response.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class VanityURLResponse(BaseModel): + """ + VanityURLResponse + """ # noqa: E501 + code: Optional[StrictStr] = None + uses: StrictInt + error: Optional[VanityURLErrorResponse] = None + __properties: ClassVar[List[str]] = ["code", "uses", "error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VanityURLResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # set to None if code (nullable) is None + # and model_fields_set contains the field + if self.code is None and "code" in self.model_fields_set: + _dict['code'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VanityURLResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VanityURLResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "uses": obj.get("uses"), + "error": VanityURLErrorResponse.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/voice_region_response.py b/dc_rest/models/voice_region_response.py new file mode 100644 index 0000000..43d7426 --- /dev/null +++ b/dc_rest/models/voice_region_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VoiceRegionResponse(BaseModel): + """ + VoiceRegionResponse + """ # noqa: E501 + id: StrictStr + name: StrictStr + custom: StrictBool + deprecated: StrictBool + optimal: StrictBool + __properties: ClassVar[List[str]] = ["id", "name", "custom", "deprecated", "optimal"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceRegionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceRegionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VoiceRegionResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "custom": obj.get("custom"), + "deprecated": obj.get("deprecated"), + "optimal": obj.get("optimal") + }) + return _obj + + diff --git a/dc_rest/models/voice_scheduled_event_create_request.py b/dc_rest/models/voice_scheduled_event_create_request.py new file mode 100644 index 0000000..25dffeb --- /dev/null +++ b/dc_rest/models/voice_scheduled_event_create_request.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class VoiceScheduledEventCreateRequest(BaseModel): + """ + VoiceScheduledEventCreateRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=100)] + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + privacy_level: Optional[Any] + entity_type: Optional[StrictInt] + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["name", "description", "image", "scheduled_start_time", "scheduled_end_time", "privacy_level", "entity_type", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceScheduledEventCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceScheduledEventCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VoiceScheduledEventCreateRequest) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "privacy_level": obj.get("privacy_level"), + "entity_type": obj.get("entity_type"), + "channel_id": obj.get("channel_id"), + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/voice_scheduled_event_patch_request_partial.py b/dc_rest/models/voice_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..3ca9d0a --- /dev/null +++ b/dc_rest/models/voice_scheduled_event_patch_request_partial.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class VoiceScheduledEventPatchRequestPartial(BaseModel): + """ + VoiceScheduledEventPatchRequestPartial + """ # noqa: E501 + status: Optional[StrictInt] = None + name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + image: Optional[StrictStr] = None + scheduled_start_time: Optional[datetime] = None + scheduled_end_time: Optional[datetime] = None + entity_type: Optional[StrictInt] = None + privacy_level: Optional[Any] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["status", "name", "description", "image", "scheduled_start_time", "scheduled_end_time", "entity_type", "privacy_level", "channel_id", "entity_metadata"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceScheduledEventPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceScheduledEventPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VoiceScheduledEventPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "name": obj.get("name"), + "description": obj.get("description"), + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "entity_type": obj.get("entity_type"), + "privacy_level": obj.get("privacy_level"), + "channel_id": obj.get("channel_id"), + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/voice_scheduled_event_response.py b/dc_rest/models/voice_scheduled_event_response.py new file mode 100644 index 0000000..ba8d87f --- /dev/null +++ b/dc_rest/models/voice_scheduled_event_response.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.models.user_response import UserResponse +from typing import Optional, Set +from typing_extensions import Self + +class VoiceScheduledEventResponse(BaseModel): + """ + VoiceScheduledEventResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + guild_id: Annotated[str, Field(strict=True)] + name: StrictStr + description: Optional[StrictStr] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + creator_id: Optional[Annotated[str, Field(strict=True)]] = None + creator: Optional[UserResponse] = None + image: Optional[StrictStr] = None + scheduled_start_time: datetime + scheduled_end_time: Optional[datetime] = None + status: Optional[StrictInt] + entity_type: Optional[StrictInt] + entity_id: Optional[Annotated[str, Field(strict=True)]] = None + user_count: Optional[StrictInt] = None + privacy_level: Optional[Any] + user_rsvp: Optional[ScheduledEventUserResponse] = None + entity_metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["id", "guild_id", "name", "description", "channel_id", "creator_id", "creator", "image", "scheduled_start_time", "scheduled_end_time", "status", "entity_type", "entity_id", "user_count", "privacy_level", "user_rsvp", "entity_metadata"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('creator_id') + def creator_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('entity_id') + def entity_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceScheduledEventResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator + if self.creator: + _dict['creator'] = self.creator.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_rsvp + if self.user_rsvp: + _dict['user_rsvp'] = self.user_rsvp.to_dict() + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creator (nullable) is None + # and model_fields_set contains the field + if self.creator is None and "creator" in self.model_fields_set: + _dict['creator'] = None + + # set to None if image (nullable) is None + # and model_fields_set contains the field + if self.image is None and "image" in self.model_fields_set: + _dict['image'] = None + + # set to None if scheduled_end_time (nullable) is None + # and model_fields_set contains the field + if self.scheduled_end_time is None and "scheduled_end_time" in self.model_fields_set: + _dict['scheduled_end_time'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if entity_type (nullable) is None + # and model_fields_set contains the field + if self.entity_type is None and "entity_type" in self.model_fields_set: + _dict['entity_type'] = None + + # set to None if user_count (nullable) is None + # and model_fields_set contains the field + if self.user_count is None and "user_count" in self.model_fields_set: + _dict['user_count'] = None + + # set to None if privacy_level (nullable) is None + # and model_fields_set contains the field + if self.privacy_level is None and "privacy_level" in self.model_fields_set: + _dict['privacy_level'] = None + + # set to None if user_rsvp (nullable) is None + # and model_fields_set contains the field + if self.user_rsvp is None and "user_rsvp" in self.model_fields_set: + _dict['user_rsvp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceScheduledEventResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VoiceScheduledEventResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "guild_id": obj.get("guild_id"), + "name": obj.get("name"), + "description": obj.get("description"), + "channel_id": obj.get("channel_id"), + "creator_id": obj.get("creator_id"), + "creator": UserResponse.from_dict(obj["creator"]) if obj.get("creator") is not None else None, + "image": obj.get("image"), + "scheduled_start_time": obj.get("scheduled_start_time"), + "scheduled_end_time": obj.get("scheduled_end_time"), + "status": obj.get("status"), + "entity_type": obj.get("entity_type"), + "entity_id": obj.get("entity_id"), + "user_count": obj.get("user_count"), + "privacy_level": obj.get("privacy_level"), + "user_rsvp": ScheduledEventUserResponse.from_dict(obj["user_rsvp"]) if obj.get("user_rsvp") is not None else None, + "entity_metadata": obj.get("entity_metadata") + }) + return _obj + + diff --git a/dc_rest/models/voice_state_response.py b/dc_rest/models/voice_state_response.py new file mode 100644 index 0000000..3d8239f --- /dev/null +++ b/dc_rest/models/voice_state_response.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_member_response import GuildMemberResponse +from typing import Optional, Set +from typing_extensions import Self + +class VoiceStateResponse(BaseModel): + """ + VoiceStateResponse + """ # noqa: E501 + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + deaf: StrictBool + guild_id: Optional[Annotated[str, Field(strict=True)]] = None + member: Optional[GuildMemberResponse] = None + mute: StrictBool + request_to_speak_timestamp: Optional[datetime] = None + suppress: StrictBool + self_stream: Optional[StrictBool] = None + self_deaf: StrictBool + self_mute: StrictBool + self_video: StrictBool + session_id: StrictStr + user_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["channel_id", "deaf", "guild_id", "member", "mute", "request_to_speak_timestamp", "suppress", "self_stream", "self_deaf", "self_mute", "self_video", "session_id", "user_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('guild_id') + def guild_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + @field_validator('user_id') + def user_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceStateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of member + if self.member: + _dict['member'] = self.member.to_dict() + # set to None if member (nullable) is None + # and model_fields_set contains the field + if self.member is None and "member" in self.model_fields_set: + _dict['member'] = None + + # set to None if request_to_speak_timestamp (nullable) is None + # and model_fields_set contains the field + if self.request_to_speak_timestamp is None and "request_to_speak_timestamp" in self.model_fields_set: + _dict['request_to_speak_timestamp'] = None + + # set to None if self_stream (nullable) is None + # and model_fields_set contains the field + if self.self_stream is None and "self_stream" in self.model_fields_set: + _dict['self_stream'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceStateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in VoiceStateResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "channel_id": obj.get("channel_id"), + "deaf": obj.get("deaf"), + "guild_id": obj.get("guild_id"), + "member": GuildMemberResponse.from_dict(obj["member"]) if obj.get("member") is not None else None, + "mute": obj.get("mute"), + "request_to_speak_timestamp": obj.get("request_to_speak_timestamp"), + "suppress": obj.get("suppress"), + "self_stream": obj.get("self_stream"), + "self_deaf": obj.get("self_deaf"), + "self_mute": obj.get("self_mute"), + "self_video": obj.get("self_video"), + "session_id": obj.get("session_id"), + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/dc_rest/models/webhook_slack_embed.py b/dc_rest/models/webhook_slack_embed.py new file mode 100644 index 0000000..23de0f2 --- /dev/null +++ b/dc_rest/models/webhook_slack_embed.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField +from typing import Optional, Set +from typing_extensions import Self + +class WebhookSlackEmbed(BaseModel): + """ + WebhookSlackEmbed + """ # noqa: E501 + title: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + title_link: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + text: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + color: Optional[Annotated[str, Field(strict=True, max_length=7)]] = None + ts: Optional[StrictInt] = None + pretext: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + footer: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + footer_icon: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + author_name: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + author_link: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + author_icon: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + image_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + thumb_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = None + fields: Optional[Annotated[List[WebhookSlackEmbedField], Field(max_length=1521)]] = None + __properties: ClassVar[List[str]] = ["title", "title_link", "text", "color", "ts", "pretext", "footer", "footer_icon", "author_name", "author_link", "author_icon", "image_url", "thumb_url", "fields"] + + @field_validator('color') + def color_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$", value): + raise ValueError(r"must validate the regular expression /^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookSlackEmbed from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if title_link (nullable) is None + # and model_fields_set contains the field + if self.title_link is None and "title_link" in self.model_fields_set: + _dict['title_link'] = None + + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if color (nullable) is None + # and model_fields_set contains the field + if self.color is None and "color" in self.model_fields_set: + _dict['color'] = None + + # set to None if ts (nullable) is None + # and model_fields_set contains the field + if self.ts is None and "ts" in self.model_fields_set: + _dict['ts'] = None + + # set to None if pretext (nullable) is None + # and model_fields_set contains the field + if self.pretext is None and "pretext" in self.model_fields_set: + _dict['pretext'] = None + + # set to None if footer (nullable) is None + # and model_fields_set contains the field + if self.footer is None and "footer" in self.model_fields_set: + _dict['footer'] = None + + # set to None if footer_icon (nullable) is None + # and model_fields_set contains the field + if self.footer_icon is None and "footer_icon" in self.model_fields_set: + _dict['footer_icon'] = None + + # set to None if author_name (nullable) is None + # and model_fields_set contains the field + if self.author_name is None and "author_name" in self.model_fields_set: + _dict['author_name'] = None + + # set to None if author_link (nullable) is None + # and model_fields_set contains the field + if self.author_link is None and "author_link" in self.model_fields_set: + _dict['author_link'] = None + + # set to None if author_icon (nullable) is None + # and model_fields_set contains the field + if self.author_icon is None and "author_icon" in self.model_fields_set: + _dict['author_icon'] = None + + # set to None if image_url (nullable) is None + # and model_fields_set contains the field + if self.image_url is None and "image_url" in self.model_fields_set: + _dict['image_url'] = None + + # set to None if thumb_url (nullable) is None + # and model_fields_set contains the field + if self.thumb_url is None and "thumb_url" in self.model_fields_set: + _dict['thumb_url'] = None + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict['fields'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookSlackEmbed from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WebhookSlackEmbed) in the input: " + _key) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "title_link": obj.get("title_link"), + "text": obj.get("text"), + "color": obj.get("color"), + "ts": obj.get("ts"), + "pretext": obj.get("pretext"), + "footer": obj.get("footer"), + "footer_icon": obj.get("footer_icon"), + "author_name": obj.get("author_name"), + "author_link": obj.get("author_link"), + "author_icon": obj.get("author_icon"), + "image_url": obj.get("image_url"), + "thumb_url": obj.get("thumb_url"), + "fields": [WebhookSlackEmbedField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) + return _obj + + diff --git a/dc_rest/models/webhook_slack_embed_field.py b/dc_rest/models/webhook_slack_embed_field.py new file mode 100644 index 0000000..c6b6fe6 --- /dev/null +++ b/dc_rest/models/webhook_slack_embed_field.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WebhookSlackEmbedField(BaseModel): + """ + WebhookSlackEmbedField + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + value: Optional[Annotated[str, Field(strict=True, max_length=152133)]] = None + inline: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["name", "value", "inline"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookSlackEmbedField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + # set to None if inline (nullable) is None + # and model_fields_set contains the field + if self.inline is None and "inline" in self.model_fields_set: + _dict['inline'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookSlackEmbedField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WebhookSlackEmbedField) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value"), + "inline": obj.get("inline") + }) + return _obj + + diff --git a/dc_rest/models/webhook_source_channel_response.py b/dc_rest/models/webhook_source_channel_response.py new file mode 100644 index 0000000..c0c03af --- /dev/null +++ b/dc_rest/models/webhook_source_channel_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WebhookSourceChannelResponse(BaseModel): + """ + WebhookSourceChannelResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookSourceChannelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookSourceChannelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WebhookSourceChannelResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/webhook_source_guild_response.py b/dc_rest/models/webhook_source_guild_response.py new file mode 100644 index 0000000..1b8b899 --- /dev/null +++ b/dc_rest/models/webhook_source_guild_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WebhookSourceGuildResponse(BaseModel): + """ + WebhookSourceGuildResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + icon: Optional[StrictStr] = None + name: StrictStr + __properties: ClassVar[List[str]] = ["id", "icon", "name"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookSourceGuildResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookSourceGuildResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WebhookSourceGuildResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "icon": obj.get("icon"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/welcome_message_response.py b/dc_rest/models/welcome_message_response.py new file mode 100644 index 0000000..0b86f6a --- /dev/null +++ b/dc_rest/models/welcome_message_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WelcomeMessageResponse(BaseModel): + """ + WelcomeMessageResponse + """ # noqa: E501 + author_ids: List[Annotated[str, Field(strict=True)]] + message: StrictStr + __properties: ClassVar[List[str]] = ["author_ids", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WelcomeMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WelcomeMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WelcomeMessageResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "author_ids": obj.get("author_ids"), + "message": obj.get("message") + }) + return _obj + + diff --git a/dc_rest/models/welcome_screen_patch_request_partial.py b/dc_rest/models/welcome_screen_patch_request_partial.py new file mode 100644 index 0000000..63f85ab --- /dev/null +++ b/dc_rest/models/welcome_screen_patch_request_partial.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel +from typing import Optional, Set +from typing_extensions import Self + +class WelcomeScreenPatchRequestPartial(BaseModel): + """ + WelcomeScreenPatchRequestPartial + """ # noqa: E501 + description: Optional[Annotated[str, Field(strict=True, max_length=140)]] = None + welcome_channels: Optional[Annotated[List[GuildWelcomeChannel], Field(max_length=5)]] = None + enabled: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["description", "welcome_channels", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WelcomeScreenPatchRequestPartial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in welcome_channels (list) + _items = [] + if self.welcome_channels: + for _item_welcome_channels in self.welcome_channels: + if _item_welcome_channels: + _items.append(_item_welcome_channels.to_dict()) + _dict['welcome_channels'] = _items + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if welcome_channels (nullable) is None + # and model_fields_set contains the field + if self.welcome_channels is None and "welcome_channels" in self.model_fields_set: + _dict['welcome_channels'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WelcomeScreenPatchRequestPartial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WelcomeScreenPatchRequestPartial) in the input: " + _key) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "welcome_channels": [GuildWelcomeChannel.from_dict(_item) for _item in obj["welcome_channels"]] if obj.get("welcome_channels") is not None else None, + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/dc_rest/models/widget_activity.py b/dc_rest/models/widget_activity.py new file mode 100644 index 0000000..18e7694 --- /dev/null +++ b/dc_rest/models/widget_activity.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class WidgetActivity(BaseModel): + """ + WidgetActivity + """ # noqa: E501 + name: StrictStr + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WidgetActivity from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetActivity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WidgetActivity) in the input: " + _key) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/dc_rest/models/widget_channel.py b/dc_rest/models/widget_channel.py new file mode 100644 index 0000000..42049d8 --- /dev/null +++ b/dc_rest/models/widget_channel.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WidgetChannel(BaseModel): + """ + WidgetChannel + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + position: StrictInt + __properties: ClassVar[List[str]] = ["id", "name", "position"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WidgetChannel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetChannel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WidgetChannel) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "position": obj.get("position") + }) + return _obj + + diff --git a/dc_rest/models/widget_member.py b/dc_rest/models/widget_member.py new file mode 100644 index 0000000..6315b4c --- /dev/null +++ b/dc_rest/models/widget_member.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.widget_activity import WidgetActivity +from typing import Optional, Set +from typing_extensions import Self + +class WidgetMember(BaseModel): + """ + WidgetMember + """ # noqa: E501 + id: StrictStr + username: StrictStr + discriminator: Optional[StrictStr] + avatar: Optional[Any] = None + status: StrictStr + avatar_url: StrictStr + activity: Optional[WidgetActivity] = None + deaf: Optional[StrictBool] = None + mute: Optional[StrictBool] = None + self_deaf: Optional[StrictBool] = None + self_mute: Optional[StrictBool] = None + suppress: Optional[StrictBool] = None + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["id", "username", "discriminator", "avatar", "status", "avatar_url", "activity", "deaf", "mute", "self_deaf", "self_mute", "suppress", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WidgetMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of activity + if self.activity: + _dict['activity'] = self.activity.to_dict() + # set to None if discriminator (nullable) is None + # and model_fields_set contains the field + if self.discriminator is None and "discriminator" in self.model_fields_set: + _dict['discriminator'] = None + + # set to None if avatar (nullable) is None + # and model_fields_set contains the field + if self.avatar is None and "avatar" in self.model_fields_set: + _dict['avatar'] = None + + # set to None if activity (nullable) is None + # and model_fields_set contains the field + if self.activity is None and "activity" in self.model_fields_set: + _dict['activity'] = None + + # set to None if deaf (nullable) is None + # and model_fields_set contains the field + if self.deaf is None and "deaf" in self.model_fields_set: + _dict['deaf'] = None + + # set to None if mute (nullable) is None + # and model_fields_set contains the field + if self.mute is None and "mute" in self.model_fields_set: + _dict['mute'] = None + + # set to None if self_deaf (nullable) is None + # and model_fields_set contains the field + if self.self_deaf is None and "self_deaf" in self.model_fields_set: + _dict['self_deaf'] = None + + # set to None if self_mute (nullable) is None + # and model_fields_set contains the field + if self.self_mute is None and "self_mute" in self.model_fields_set: + _dict['self_mute'] = None + + # set to None if suppress (nullable) is None + # and model_fields_set contains the field + if self.suppress is None and "suppress" in self.model_fields_set: + _dict['suppress'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WidgetMember) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "username": obj.get("username"), + "discriminator": obj.get("discriminator"), + "avatar": obj.get("avatar"), + "status": obj.get("status"), + "avatar_url": obj.get("avatar_url"), + "activity": WidgetActivity.from_dict(obj["activity"]) if obj.get("activity") is not None else None, + "deaf": obj.get("deaf"), + "mute": obj.get("mute"), + "self_deaf": obj.get("self_deaf"), + "self_mute": obj.get("self_mute"), + "suppress": obj.get("suppress"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/models/widget_response.py b/dc_rest/models/widget_response.py new file mode 100644 index 0000000..b5e292f --- /dev/null +++ b/dc_rest/models/widget_response.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dc_rest.models.widget_channel import WidgetChannel +from dc_rest.models.widget_member import WidgetMember +from typing import Optional, Set +from typing_extensions import Self + +class WidgetResponse(BaseModel): + """ + WidgetResponse + """ # noqa: E501 + id: Annotated[str, Field(strict=True)] + name: StrictStr + instant_invite: Optional[StrictStr] = None + channels: List[WidgetChannel] + members: List[WidgetMember] + presence_count: StrictInt + __properties: ClassVar[List[str]] = ["id", "name", "instant_invite", "channels", "members", "presence_count"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WidgetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in channels (list) + _items = [] + if self.channels: + for _item_channels in self.channels: + if _item_channels: + _items.append(_item_channels.to_dict()) + _dict['channels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # set to None if instant_invite (nullable) is None + # and model_fields_set contains the field + if self.instant_invite is None and "instant_invite" in self.model_fields_set: + _dict['instant_invite'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WidgetResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "instant_invite": obj.get("instant_invite"), + "channels": [WidgetChannel.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") is not None else None, + "members": [WidgetMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "presence_count": obj.get("presence_count") + }) + return _obj + + diff --git a/dc_rest/models/widget_settings_response.py b/dc_rest/models/widget_settings_response.py new file mode 100644 index 0000000..9f99302 --- /dev/null +++ b/dc_rest/models/widget_settings_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class WidgetSettingsResponse(BaseModel): + """ + WidgetSettingsResponse + """ # noqa: E501 + enabled: StrictBool + channel_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["enabled", "channel_id"] + + @field_validator('channel_id') + def channel_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(0|[1-9][0-9]*)$", value): + raise ValueError(r"must validate the regular expression /^(0|[1-9][0-9]*)$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WidgetSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WidgetSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in WidgetSettingsResponse) in the input: " + _key) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "channel_id": obj.get("channel_id") + }) + return _obj + + diff --git a/dc_rest/py.typed b/dc_rest/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/dc_rest/rest.py b/dc_rest/rest.py new file mode 100644 index 0000000..e8e7e1a --- /dev/null +++ b/dc_rest/rest.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import io +import json +import re +import ssl +from typing import Optional, Union + +import aiohttp +import aiohttp_retry + +from dc_rest.exceptions import ApiException, ApiValueError + +RESTResponseType = aiohttp.ClientResponse + +ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'}) + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + async def read(self): + if self.data is None: + self.data = await self.response.read() + return self.data + + def getheaders(self): + """Returns a CIMultiDictProxy of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + + # maxsize is number of requests to host that are allowed in parallel + self.maxsize = configuration.connection_pool_maxsize + + self.ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert, + cadata=configuration.ca_cert_data, + ) + if configuration.cert_file: + self.ssl_context.load_cert_chain( + configuration.cert_file, keyfile=configuration.key_file + ) + + if not configuration.verify_ssl: + self.ssl_context.check_hostname = False + self.ssl_context.verify_mode = ssl.CERT_NONE + + self.proxy = configuration.proxy + self.proxy_headers = configuration.proxy_headers + + self.retries = configuration.retries + + self.pool_manager: Optional[aiohttp.ClientSession] = None + self.retry_client: Optional[aiohttp_retry.RetryClient] = None + + async def close(self) -> None: + if self.pool_manager: + await self.pool_manager.close() + if self.retry_client is not None: + await self.retry_client.close() + + async def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Execute request + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + timeout = _request_timeout or 5 * 60 + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } + + if self.proxy: + args["proxy"] = self.proxy + if self.proxy_headers: + args["proxy_headers"] = self.proxy_headers + + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): + if body is not None: + body = json.dumps(body) + args["data"] = body + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': + args["data"] = aiohttp.FormData(post_params) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by aiohttp + del headers['Content-Type'] + data = aiohttp.FormData() + for param in post_params: + k, v = param + if isinstance(v, tuple) and len(v) == 3: + data.add_field( + k, + value=v[1], + filename=v[0], + content_type=v[2] + ) + else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) + data.add_field(k, v) + args["data"] = data + + # Pass a `bytes` or `str` parameter directly in the body to support + # other content types than Json when `body` argument is provided + # in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + args["data"] = body + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + + pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] + + # https pool manager + if self.pool_manager is None: + self.pool_manager = aiohttp.ClientSession( + connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context), + trust_env=True, + ) + pool_manager = self.pool_manager + + if self.retries is not None and method in ALLOW_RETRY_METHODS: + if self.retry_client is None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=self.retries, + factor=2.0, + start_timeout=0.1, + max_timeout=120.0 + ) + ) + pool_manager = self.retry_client + + r = await pool_manager.request(**args) + + return RESTResponse(r) diff --git a/docs/AccountResponse.md b/docs/AccountResponse.md new file mode 100644 index 0000000..306085d --- /dev/null +++ b/docs/AccountResponse.md @@ -0,0 +1,30 @@ +# AccountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.account_response import AccountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountResponse from a JSON string +account_response_instance = AccountResponse.from_json(json) +# print the JSON string representation of the object +print(AccountResponse.to_json()) + +# convert the object into a dict +account_response_dict = account_response_instance.to_dict() +# create an instance of AccountResponse from a dict +account_response_from_dict = AccountResponse.from_dict(account_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActionRowComponentForMessageRequest.md b/docs/ActionRowComponentForMessageRequest.md new file mode 100644 index 0000000..231fb81 --- /dev/null +++ b/docs/ActionRowComponentForMessageRequest.md @@ -0,0 +1,30 @@ +# ActionRowComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**components** | [**List[ActionRowComponentForMessageRequestComponentsInner]**](ActionRowComponentForMessageRequestComponentsInner.md) | | + +## Example + +```python +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionRowComponentForMessageRequest from a JSON string +action_row_component_for_message_request_instance = ActionRowComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ActionRowComponentForMessageRequest.to_json()) + +# convert the object into a dict +action_row_component_for_message_request_dict = action_row_component_for_message_request_instance.to_dict() +# create an instance of ActionRowComponentForMessageRequest from a dict +action_row_component_for_message_request_from_dict = ActionRowComponentForMessageRequest.from_dict(action_row_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActionRowComponentForMessageRequestComponentsInner.md b/docs/ActionRowComponentForMessageRequestComponentsInner.md new file mode 100644 index 0000000..6687a84 --- /dev/null +++ b/docs/ActionRowComponentForMessageRequestComponentsInner.md @@ -0,0 +1,42 @@ +# ActionRowComponentForMessageRequestComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] +**emoji** | [**ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md) | | [optional] +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**default_values** | [**List[UserSelectDefaultValue]**](UserSelectDefaultValue.md) | | [optional] +**channel_types** | **List[int]** | | [optional] +**options** | [**List[StringSelectOptionForMessageRequest]**](StringSelectOptionForMessageRequest.md) | | + +## Example + +```python +from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionRowComponentForMessageRequestComponentsInner from a JSON string +action_row_component_for_message_request_components_inner_instance = ActionRowComponentForMessageRequestComponentsInner.from_json(json) +# print the JSON string representation of the object +print(ActionRowComponentForMessageRequestComponentsInner.to_json()) + +# convert the object into a dict +action_row_component_for_message_request_components_inner_dict = action_row_component_for_message_request_components_inner_instance.to_dict() +# create an instance of ActionRowComponentForMessageRequestComponentsInner from a dict +action_row_component_for_message_request_components_inner_from_dict = ActionRowComponentForMessageRequestComponentsInner.from_dict(action_row_component_for_message_request_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActionRowComponentForModalRequest.md b/docs/ActionRowComponentForModalRequest.md new file mode 100644 index 0000000..2b6e487 --- /dev/null +++ b/docs/ActionRowComponentForModalRequest.md @@ -0,0 +1,30 @@ +# ActionRowComponentForModalRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**components** | [**List[TextInputComponentForModalRequest]**](TextInputComponentForModalRequest.md) | | + +## Example + +```python +from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionRowComponentForModalRequest from a JSON string +action_row_component_for_modal_request_instance = ActionRowComponentForModalRequest.from_json(json) +# print the JSON string representation of the object +print(ActionRowComponentForModalRequest.to_json()) + +# convert the object into a dict +action_row_component_for_modal_request_dict = action_row_component_for_modal_request_instance.to_dict() +# create an instance of ActionRowComponentForModalRequest from a dict +action_row_component_for_modal_request_from_dict = ActionRowComponentForModalRequest.from_dict(action_row_component_for_modal_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActionRowComponentResponse.md b/docs/ActionRowComponentResponse.md new file mode 100644 index 0000000..c4cee51 --- /dev/null +++ b/docs/ActionRowComponentResponse.md @@ -0,0 +1,31 @@ +# ActionRowComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**components** | [**List[ActionRowComponentResponseComponentsInner]**](ActionRowComponentResponseComponentsInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.action_row_component_response import ActionRowComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionRowComponentResponse from a JSON string +action_row_component_response_instance = ActionRowComponentResponse.from_json(json) +# print the JSON string representation of the object +print(ActionRowComponentResponse.to_json()) + +# convert the object into a dict +action_row_component_response_dict = action_row_component_response_instance.to_dict() +# create an instance of ActionRowComponentResponse from a dict +action_row_component_response_from_dict = ActionRowComponentResponse.from_dict(action_row_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActionRowComponentResponseComponentsInner.md b/docs/ActionRowComponentResponseComponentsInner.md new file mode 100644 index 0000000..353c93e --- /dev/null +++ b/docs/ActionRowComponentResponseComponentsInner.md @@ -0,0 +1,47 @@ +# ActionRowComponentResponseComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**emoji** | [**ComponentEmojiResponse**](ComponentEmojiResponse.md) | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**channel_types** | **List[int]** | | [optional] +**default_values** | [**List[UserSelectDefaultValueResponse]**](UserSelectDefaultValueResponse.md) | | [optional] +**options** | [**List[StringSelectOptionResponse]**](StringSelectOptionResponse.md) | | +**value** | **str** | | [optional] +**required** | **bool** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionRowComponentResponseComponentsInner from a JSON string +action_row_component_response_components_inner_instance = ActionRowComponentResponseComponentsInner.from_json(json) +# print the JSON string representation of the object +print(ActionRowComponentResponseComponentsInner.to_json()) + +# convert the object into a dict +action_row_component_response_components_inner_dict = action_row_component_response_components_inner_instance.to_dict() +# create an instance of ActionRowComponentResponseComponentsInner from a dict +action_row_component_response_components_inner_from_dict = ActionRowComponentResponseComponentsInner.from_dict(action_row_component_response_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivitiesAttachmentResponse.md b/docs/ActivitiesAttachmentResponse.md new file mode 100644 index 0000000..a84338b --- /dev/null +++ b/docs/ActivitiesAttachmentResponse.md @@ -0,0 +1,29 @@ +# ActivitiesAttachmentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attachment** | [**AttachmentResponse**](AttachmentResponse.md) | | + +## Example + +```python +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivitiesAttachmentResponse from a JSON string +activities_attachment_response_instance = ActivitiesAttachmentResponse.from_json(json) +# print the JSON string representation of the object +print(ActivitiesAttachmentResponse.to_json()) + +# convert the object into a dict +activities_attachment_response_dict = activities_attachment_response_instance.to_dict() +# create an instance of ActivitiesAttachmentResponse from a dict +activities_attachment_response_from_dict = ActivitiesAttachmentResponse.from_dict(activities_attachment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddGroupDmUser201Response.md b/docs/AddGroupDmUser201Response.md new file mode 100644 index 0000000..d76afe5 --- /dev/null +++ b/docs/AddGroupDmUser201Response.md @@ -0,0 +1,39 @@ +# AddGroupDmUser201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**recipients** | [**List[UserResponse]**](UserResponse.md) | | +**name** | **str** | | [optional] +**icon** | **str** | | [optional] +**owner_id** | **str** | | [optional] +**managed** | **bool** | | [optional] +**application_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of AddGroupDmUser201Response from a JSON string +add_group_dm_user201_response_instance = AddGroupDmUser201Response.from_json(json) +# print the JSON string representation of the object +print(AddGroupDmUser201Response.to_json()) + +# convert the object into a dict +add_group_dm_user201_response_dict = add_group_dm_user201_response_instance.to_dict() +# create an instance of AddGroupDmUser201Response from a dict +add_group_dm_user201_response_from_dict = AddGroupDmUser201Response.from_dict(add_group_dm_user201_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddGroupDmUserRequest.md b/docs/AddGroupDmUserRequest.md new file mode 100644 index 0000000..464aa22 --- /dev/null +++ b/docs/AddGroupDmUserRequest.md @@ -0,0 +1,30 @@ +# AddGroupDmUserRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | [optional] +**nick** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddGroupDmUserRequest from a JSON string +add_group_dm_user_request_instance = AddGroupDmUserRequest.from_json(json) +# print the JSON string representation of the object +print(AddGroupDmUserRequest.to_json()) + +# convert the object into a dict +add_group_dm_user_request_dict = add_group_dm_user_request_instance.to_dict() +# create an instance of AddGroupDmUserRequest from a dict +add_group_dm_user_request_from_dict = AddGroupDmUserRequest.from_dict(add_group_dm_user_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddGuildMemberRequest.md b/docs/AddGuildMemberRequest.md new file mode 100644 index 0000000..f723bc2 --- /dev/null +++ b/docs/AddGuildMemberRequest.md @@ -0,0 +1,34 @@ +# AddGuildMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nick** | **str** | | [optional] +**roles** | **List[Optional[str]]** | | [optional] +**mute** | **bool** | | [optional] +**deaf** | **bool** | | [optional] +**access_token** | **str** | | +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddGuildMemberRequest from a JSON string +add_guild_member_request_instance = AddGuildMemberRequest.from_json(json) +# print the JSON string representation of the object +print(AddGuildMemberRequest.to_json()) + +# convert the object into a dict +add_guild_member_request_dict = add_guild_member_request_instance.to_dict() +# create an instance of AddGuildMemberRequest from a dict +add_guild_member_request_from_dict = AddGuildMemberRequest.from_dict(add_guild_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddLobbyMemberRequest.md b/docs/AddLobbyMemberRequest.md new file mode 100644 index 0000000..34881b0 --- /dev/null +++ b/docs/AddLobbyMemberRequest.md @@ -0,0 +1,30 @@ +# AddLobbyMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **Dict[str, str]** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddLobbyMemberRequest from a JSON string +add_lobby_member_request_instance = AddLobbyMemberRequest.from_json(json) +# print the JSON string representation of the object +print(AddLobbyMemberRequest.to_json()) + +# convert the object into a dict +add_lobby_member_request_dict = add_lobby_member_request_instance.to_dict() +# create an instance of AddLobbyMemberRequest from a dict +add_lobby_member_request_from_dict = AddLobbyMemberRequest.from_dict(add_lobby_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandAttachmentOption.md b/docs/ApplicationCommandAttachmentOption.md new file mode 100644 index 0000000..034e03e --- /dev/null +++ b/docs/ApplicationCommandAttachmentOption.md @@ -0,0 +1,34 @@ +# ApplicationCommandAttachmentOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandAttachmentOption from a JSON string +application_command_attachment_option_instance = ApplicationCommandAttachmentOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandAttachmentOption.to_json()) + +# convert the object into a dict +application_command_attachment_option_dict = application_command_attachment_option_instance.to_dict() +# create an instance of ApplicationCommandAttachmentOption from a dict +application_command_attachment_option_from_dict = ApplicationCommandAttachmentOption.from_dict(application_command_attachment_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandAttachmentOptionResponse.md b/docs/ApplicationCommandAttachmentOptionResponse.md new file mode 100644 index 0000000..cf998c2 --- /dev/null +++ b/docs/ApplicationCommandAttachmentOptionResponse.md @@ -0,0 +1,36 @@ +# ApplicationCommandAttachmentOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandAttachmentOptionResponse from a JSON string +application_command_attachment_option_response_instance = ApplicationCommandAttachmentOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandAttachmentOptionResponse.to_json()) + +# convert the object into a dict +application_command_attachment_option_response_dict = application_command_attachment_option_response_instance.to_dict() +# create an instance of ApplicationCommandAttachmentOptionResponse from a dict +application_command_attachment_option_response_from_dict = ApplicationCommandAttachmentOptionResponse.from_dict(application_command_attachment_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandAutocompleteCallbackRequest.md b/docs/ApplicationCommandAutocompleteCallbackRequest.md new file mode 100644 index 0000000..fc39fb9 --- /dev/null +++ b/docs/ApplicationCommandAutocompleteCallbackRequest.md @@ -0,0 +1,30 @@ +# ApplicationCommandAutocompleteCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**data** | [**ApplicationCommandAutocompleteCallbackRequestData**](ApplicationCommandAutocompleteCallbackRequestData.md) | | + +## Example + +```python +from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandAutocompleteCallbackRequest from a JSON string +application_command_autocomplete_callback_request_instance = ApplicationCommandAutocompleteCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandAutocompleteCallbackRequest.to_json()) + +# convert the object into a dict +application_command_autocomplete_callback_request_dict = application_command_autocomplete_callback_request_instance.to_dict() +# create an instance of ApplicationCommandAutocompleteCallbackRequest from a dict +application_command_autocomplete_callback_request_from_dict = ApplicationCommandAutocompleteCallbackRequest.from_dict(application_command_autocomplete_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandAutocompleteCallbackRequestData.md b/docs/ApplicationCommandAutocompleteCallbackRequestData.md new file mode 100644 index 0000000..176bd02 --- /dev/null +++ b/docs/ApplicationCommandAutocompleteCallbackRequestData.md @@ -0,0 +1,29 @@ +# ApplicationCommandAutocompleteCallbackRequestData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**choices** | [**List[ApplicationCommandOptionStringChoice]**](ApplicationCommandOptionStringChoice.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandAutocompleteCallbackRequestData from a JSON string +application_command_autocomplete_callback_request_data_instance = ApplicationCommandAutocompleteCallbackRequestData.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandAutocompleteCallbackRequestData.to_json()) + +# convert the object into a dict +application_command_autocomplete_callback_request_data_dict = application_command_autocomplete_callback_request_data_instance.to_dict() +# create an instance of ApplicationCommandAutocompleteCallbackRequestData from a dict +application_command_autocomplete_callback_request_data_from_dict = ApplicationCommandAutocompleteCallbackRequestData.from_dict(application_command_autocomplete_callback_request_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandBooleanOption.md b/docs/ApplicationCommandBooleanOption.md new file mode 100644 index 0000000..2523396 --- /dev/null +++ b/docs/ApplicationCommandBooleanOption.md @@ -0,0 +1,34 @@ +# ApplicationCommandBooleanOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandBooleanOption from a JSON string +application_command_boolean_option_instance = ApplicationCommandBooleanOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandBooleanOption.to_json()) + +# convert the object into a dict +application_command_boolean_option_dict = application_command_boolean_option_instance.to_dict() +# create an instance of ApplicationCommandBooleanOption from a dict +application_command_boolean_option_from_dict = ApplicationCommandBooleanOption.from_dict(application_command_boolean_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandBooleanOptionResponse.md b/docs/ApplicationCommandBooleanOptionResponse.md new file mode 100644 index 0000000..96d5360 --- /dev/null +++ b/docs/ApplicationCommandBooleanOptionResponse.md @@ -0,0 +1,36 @@ +# ApplicationCommandBooleanOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandBooleanOptionResponse from a JSON string +application_command_boolean_option_response_instance = ApplicationCommandBooleanOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandBooleanOptionResponse.to_json()) + +# convert the object into a dict +application_command_boolean_option_response_dict = application_command_boolean_option_response_instance.to_dict() +# create an instance of ApplicationCommandBooleanOptionResponse from a dict +application_command_boolean_option_response_from_dict = ApplicationCommandBooleanOptionResponse.from_dict(application_command_boolean_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandChannelOption.md b/docs/ApplicationCommandChannelOption.md new file mode 100644 index 0000000..671f491 --- /dev/null +++ b/docs/ApplicationCommandChannelOption.md @@ -0,0 +1,35 @@ +# ApplicationCommandChannelOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandChannelOption from a JSON string +application_command_channel_option_instance = ApplicationCommandChannelOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandChannelOption.to_json()) + +# convert the object into a dict +application_command_channel_option_dict = application_command_channel_option_instance.to_dict() +# create an instance of ApplicationCommandChannelOption from a dict +application_command_channel_option_from_dict = ApplicationCommandChannelOption.from_dict(application_command_channel_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandChannelOptionResponse.md b/docs/ApplicationCommandChannelOptionResponse.md new file mode 100644 index 0000000..81f2e4c --- /dev/null +++ b/docs/ApplicationCommandChannelOptionResponse.md @@ -0,0 +1,37 @@ +# ApplicationCommandChannelOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandChannelOptionResponse from a JSON string +application_command_channel_option_response_instance = ApplicationCommandChannelOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandChannelOptionResponse.to_json()) + +# convert the object into a dict +application_command_channel_option_response_dict = application_command_channel_option_response_instance.to_dict() +# create an instance of ApplicationCommandChannelOptionResponse from a dict +application_command_channel_option_response_from_dict = ApplicationCommandChannelOptionResponse.from_dict(application_command_channel_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandCreateRequest.md b/docs/ApplicationCommandCreateRequest.md new file mode 100644 index 0000000..4385bdf --- /dev/null +++ b/docs/ApplicationCommandCreateRequest.md @@ -0,0 +1,39 @@ +# ApplicationCommandCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**options** | [**List[ApplicationCommandCreateRequestOptionsInner]**](ApplicationCommandCreateRequestOptionsInner.md) | | [optional] +**default_member_permissions** | **int** | | [optional] +**dm_permission** | **bool** | | [optional] +**contexts** | **List[int]** | | [optional] +**integration_types** | **List[int]** | | [optional] +**handler** | **int** | | [optional] +**type** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandCreateRequest from a JSON string +application_command_create_request_instance = ApplicationCommandCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandCreateRequest.to_json()) + +# convert the object into a dict +application_command_create_request_dict = application_command_create_request_instance.to_dict() +# create an instance of ApplicationCommandCreateRequest from a dict +application_command_create_request_from_dict = ApplicationCommandCreateRequest.from_dict(application_command_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandCreateRequestOptionsInner.md b/docs/ApplicationCommandCreateRequestOptionsInner.md new file mode 100644 index 0000000..918e164 --- /dev/null +++ b/docs/ApplicationCommandCreateRequestOptionsInner.md @@ -0,0 +1,42 @@ +# ApplicationCommandCreateRequestOptionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoice]**](ApplicationCommandOptionStringChoice.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOptionOptionsInner]**](ApplicationCommandSubcommandOptionOptionsInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandCreateRequestOptionsInner from a JSON string +application_command_create_request_options_inner_instance = ApplicationCommandCreateRequestOptionsInner.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandCreateRequestOptionsInner.to_json()) + +# convert the object into a dict +application_command_create_request_options_inner_dict = application_command_create_request_options_inner_instance.to_dict() +# create an instance of ApplicationCommandCreateRequestOptionsInner from a dict +application_command_create_request_options_inner_from_dict = ApplicationCommandCreateRequestOptionsInner.from_dict(application_command_create_request_options_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandIntegerOption.md b/docs/ApplicationCommandIntegerOption.md new file mode 100644 index 0000000..c5d054a --- /dev/null +++ b/docs/ApplicationCommandIntegerOption.md @@ -0,0 +1,38 @@ +# ApplicationCommandIntegerOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionIntegerChoice]**](ApplicationCommandOptionIntegerChoice.md) | | [optional] +**min_value** | **int** | | [optional] +**max_value** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandIntegerOption from a JSON string +application_command_integer_option_instance = ApplicationCommandIntegerOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandIntegerOption.to_json()) + +# convert the object into a dict +application_command_integer_option_dict = application_command_integer_option_instance.to_dict() +# create an instance of ApplicationCommandIntegerOption from a dict +application_command_integer_option_from_dict = ApplicationCommandIntegerOption.from_dict(application_command_integer_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandIntegerOptionResponse.md b/docs/ApplicationCommandIntegerOptionResponse.md new file mode 100644 index 0000000..471382a --- /dev/null +++ b/docs/ApplicationCommandIntegerOptionResponse.md @@ -0,0 +1,40 @@ +# ApplicationCommandIntegerOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionIntegerChoiceResponse]**](ApplicationCommandOptionIntegerChoiceResponse.md) | | [optional] +**min_value** | **int** | | [optional] +**max_value** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandIntegerOptionResponse from a JSON string +application_command_integer_option_response_instance = ApplicationCommandIntegerOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandIntegerOptionResponse.to_json()) + +# convert the object into a dict +application_command_integer_option_response_dict = application_command_integer_option_response_instance.to_dict() +# create an instance of ApplicationCommandIntegerOptionResponse from a dict +application_command_integer_option_response_from_dict = ApplicationCommandIntegerOptionResponse.from_dict(application_command_integer_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandInteractionMetadataResponse.md b/docs/ApplicationCommandInteractionMetadataResponse.md new file mode 100644 index 0000000..c666d6d --- /dev/null +++ b/docs/ApplicationCommandInteractionMetadataResponse.md @@ -0,0 +1,35 @@ +# ApplicationCommandInteractionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**authorizing_integration_owners** | **Dict[str, str]** | | +**original_response_message_id** | **str** | | [optional] +**target_user** | [**UserResponse**](UserResponse.md) | | [optional] +**target_message_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandInteractionMetadataResponse from a JSON string +application_command_interaction_metadata_response_instance = ApplicationCommandInteractionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandInteractionMetadataResponse.to_json()) + +# convert the object into a dict +application_command_interaction_metadata_response_dict = application_command_interaction_metadata_response_instance.to_dict() +# create an instance of ApplicationCommandInteractionMetadataResponse from a dict +application_command_interaction_metadata_response_from_dict = ApplicationCommandInteractionMetadataResponse.from_dict(application_command_interaction_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandMentionableOption.md b/docs/ApplicationCommandMentionableOption.md new file mode 100644 index 0000000..62c7e9f --- /dev/null +++ b/docs/ApplicationCommandMentionableOption.md @@ -0,0 +1,34 @@ +# ApplicationCommandMentionableOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandMentionableOption from a JSON string +application_command_mentionable_option_instance = ApplicationCommandMentionableOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandMentionableOption.to_json()) + +# convert the object into a dict +application_command_mentionable_option_dict = application_command_mentionable_option_instance.to_dict() +# create an instance of ApplicationCommandMentionableOption from a dict +application_command_mentionable_option_from_dict = ApplicationCommandMentionableOption.from_dict(application_command_mentionable_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandMentionableOptionResponse.md b/docs/ApplicationCommandMentionableOptionResponse.md new file mode 100644 index 0000000..3a1fc39 --- /dev/null +++ b/docs/ApplicationCommandMentionableOptionResponse.md @@ -0,0 +1,36 @@ +# ApplicationCommandMentionableOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandMentionableOptionResponse from a JSON string +application_command_mentionable_option_response_instance = ApplicationCommandMentionableOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandMentionableOptionResponse.to_json()) + +# convert the object into a dict +application_command_mentionable_option_response_dict = application_command_mentionable_option_response_instance.to_dict() +# create an instance of ApplicationCommandMentionableOptionResponse from a dict +application_command_mentionable_option_response_from_dict = ApplicationCommandMentionableOptionResponse.from_dict(application_command_mentionable_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandNumberOption.md b/docs/ApplicationCommandNumberOption.md new file mode 100644 index 0000000..5e75547 --- /dev/null +++ b/docs/ApplicationCommandNumberOption.md @@ -0,0 +1,38 @@ +# ApplicationCommandNumberOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionNumberChoice]**](ApplicationCommandOptionNumberChoice.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandNumberOption from a JSON string +application_command_number_option_instance = ApplicationCommandNumberOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandNumberOption.to_json()) + +# convert the object into a dict +application_command_number_option_dict = application_command_number_option_instance.to_dict() +# create an instance of ApplicationCommandNumberOption from a dict +application_command_number_option_from_dict = ApplicationCommandNumberOption.from_dict(application_command_number_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandNumberOptionResponse.md b/docs/ApplicationCommandNumberOptionResponse.md new file mode 100644 index 0000000..fc3438c --- /dev/null +++ b/docs/ApplicationCommandNumberOptionResponse.md @@ -0,0 +1,40 @@ +# ApplicationCommandNumberOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionNumberChoiceResponse]**](ApplicationCommandOptionNumberChoiceResponse.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandNumberOptionResponse from a JSON string +application_command_number_option_response_instance = ApplicationCommandNumberOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandNumberOptionResponse.to_json()) + +# convert the object into a dict +application_command_number_option_response_dict = application_command_number_option_response_instance.to_dict() +# create an instance of ApplicationCommandNumberOptionResponse from a dict +application_command_number_option_response_from_dict = ApplicationCommandNumberOptionResponse.from_dict(application_command_number_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionIntegerChoice.md b/docs/ApplicationCommandOptionIntegerChoice.md new file mode 100644 index 0000000..1e6de78 --- /dev/null +++ b/docs/ApplicationCommandOptionIntegerChoice.md @@ -0,0 +1,31 @@ +# ApplicationCommandOptionIntegerChoice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **int** | | + +## Example + +```python +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionIntegerChoice from a JSON string +application_command_option_integer_choice_instance = ApplicationCommandOptionIntegerChoice.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionIntegerChoice.to_json()) + +# convert the object into a dict +application_command_option_integer_choice_dict = application_command_option_integer_choice_instance.to_dict() +# create an instance of ApplicationCommandOptionIntegerChoice from a dict +application_command_option_integer_choice_from_dict = ApplicationCommandOptionIntegerChoice.from_dict(application_command_option_integer_choice_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionIntegerChoiceResponse.md b/docs/ApplicationCommandOptionIntegerChoiceResponse.md new file mode 100644 index 0000000..0ec9489 --- /dev/null +++ b/docs/ApplicationCommandOptionIntegerChoiceResponse.md @@ -0,0 +1,32 @@ +# ApplicationCommandOptionIntegerChoiceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **int** | | + +## Example + +```python +from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionIntegerChoiceResponse from a JSON string +application_command_option_integer_choice_response_instance = ApplicationCommandOptionIntegerChoiceResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionIntegerChoiceResponse.to_json()) + +# convert the object into a dict +application_command_option_integer_choice_response_dict = application_command_option_integer_choice_response_instance.to_dict() +# create an instance of ApplicationCommandOptionIntegerChoiceResponse from a dict +application_command_option_integer_choice_response_from_dict = ApplicationCommandOptionIntegerChoiceResponse.from_dict(application_command_option_integer_choice_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionNumberChoice.md b/docs/ApplicationCommandOptionNumberChoice.md new file mode 100644 index 0000000..f907fce --- /dev/null +++ b/docs/ApplicationCommandOptionNumberChoice.md @@ -0,0 +1,31 @@ +# ApplicationCommandOptionNumberChoice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **float** | | + +## Example + +```python +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionNumberChoice from a JSON string +application_command_option_number_choice_instance = ApplicationCommandOptionNumberChoice.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionNumberChoice.to_json()) + +# convert the object into a dict +application_command_option_number_choice_dict = application_command_option_number_choice_instance.to_dict() +# create an instance of ApplicationCommandOptionNumberChoice from a dict +application_command_option_number_choice_from_dict = ApplicationCommandOptionNumberChoice.from_dict(application_command_option_number_choice_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionNumberChoiceResponse.md b/docs/ApplicationCommandOptionNumberChoiceResponse.md new file mode 100644 index 0000000..4af96c3 --- /dev/null +++ b/docs/ApplicationCommandOptionNumberChoiceResponse.md @@ -0,0 +1,32 @@ +# ApplicationCommandOptionNumberChoiceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **float** | | + +## Example + +```python +from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionNumberChoiceResponse from a JSON string +application_command_option_number_choice_response_instance = ApplicationCommandOptionNumberChoiceResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionNumberChoiceResponse.to_json()) + +# convert the object into a dict +application_command_option_number_choice_response_dict = application_command_option_number_choice_response_instance.to_dict() +# create an instance of ApplicationCommandOptionNumberChoiceResponse from a dict +application_command_option_number_choice_response_from_dict = ApplicationCommandOptionNumberChoiceResponse.from_dict(application_command_option_number_choice_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionStringChoice.md b/docs/ApplicationCommandOptionStringChoice.md new file mode 100644 index 0000000..83ba82d --- /dev/null +++ b/docs/ApplicationCommandOptionStringChoice.md @@ -0,0 +1,31 @@ +# ApplicationCommandOptionStringChoice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **str** | | + +## Example + +```python +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionStringChoice from a JSON string +application_command_option_string_choice_instance = ApplicationCommandOptionStringChoice.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionStringChoice.to_json()) + +# convert the object into a dict +application_command_option_string_choice_dict = application_command_option_string_choice_instance.to_dict() +# create an instance of ApplicationCommandOptionStringChoice from a dict +application_command_option_string_choice_from_dict = ApplicationCommandOptionStringChoice.from_dict(application_command_option_string_choice_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandOptionStringChoiceResponse.md b/docs/ApplicationCommandOptionStringChoiceResponse.md new file mode 100644 index 0000000..cccaa5a --- /dev/null +++ b/docs/ApplicationCommandOptionStringChoiceResponse.md @@ -0,0 +1,32 @@ +# ApplicationCommandOptionStringChoiceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**value** | **str** | | + +## Example + +```python +from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandOptionStringChoiceResponse from a JSON string +application_command_option_string_choice_response_instance = ApplicationCommandOptionStringChoiceResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandOptionStringChoiceResponse.to_json()) + +# convert the object into a dict +application_command_option_string_choice_response_dict = application_command_option_string_choice_response_instance.to_dict() +# create an instance of ApplicationCommandOptionStringChoiceResponse from a dict +application_command_option_string_choice_response_from_dict = ApplicationCommandOptionStringChoiceResponse.from_dict(application_command_option_string_choice_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandPatchRequestPartial.md b/docs/ApplicationCommandPatchRequestPartial.md new file mode 100644 index 0000000..87c873d --- /dev/null +++ b/docs/ApplicationCommandPatchRequestPartial.md @@ -0,0 +1,38 @@ +# ApplicationCommandPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**options** | [**List[ApplicationCommandCreateRequestOptionsInner]**](ApplicationCommandCreateRequestOptionsInner.md) | | [optional] +**default_member_permissions** | **int** | | [optional] +**dm_permission** | **bool** | | [optional] +**contexts** | **List[int]** | | [optional] +**integration_types** | **List[int]** | | [optional] +**handler** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandPatchRequestPartial from a JSON string +application_command_patch_request_partial_instance = ApplicationCommandPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandPatchRequestPartial.to_json()) + +# convert the object into a dict +application_command_patch_request_partial_dict = application_command_patch_request_partial_instance.to_dict() +# create an instance of ApplicationCommandPatchRequestPartial from a dict +application_command_patch_request_partial_from_dict = ApplicationCommandPatchRequestPartial.from_dict(application_command_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandPermission.md b/docs/ApplicationCommandPermission.md new file mode 100644 index 0000000..73468b5 --- /dev/null +++ b/docs/ApplicationCommandPermission.md @@ -0,0 +1,31 @@ +# ApplicationCommandPermission + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**permission** | **bool** | | + +## Example + +```python +from dc_rest.models.application_command_permission import ApplicationCommandPermission + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandPermission from a JSON string +application_command_permission_instance = ApplicationCommandPermission.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandPermission.to_json()) + +# convert the object into a dict +application_command_permission_dict = application_command_permission_instance.to_dict() +# create an instance of ApplicationCommandPermission from a dict +application_command_permission_from_dict = ApplicationCommandPermission.from_dict(application_command_permission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandResponse.md b/docs/ApplicationCommandResponse.md new file mode 100644 index 0000000..fdb2ef6 --- /dev/null +++ b/docs/ApplicationCommandResponse.md @@ -0,0 +1,45 @@ +# ApplicationCommandResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**application_id** | **str** | | +**version** | **str** | | +**default_member_permissions** | **str** | | [optional] +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**guild_id** | **str** | | [optional] +**dm_permission** | **bool** | | [optional] +**contexts** | **List[int]** | | [optional] +**integration_types** | **List[int]** | | [optional] +**options** | [**List[ApplicationCommandResponseOptionsInner]**](ApplicationCommandResponseOptionsInner.md) | | [optional] +**nsfw** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_response import ApplicationCommandResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandResponse from a JSON string +application_command_response_instance = ApplicationCommandResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandResponse.to_json()) + +# convert the object into a dict +application_command_response_dict = application_command_response_instance.to_dict() +# create an instance of ApplicationCommandResponse from a dict +application_command_response_from_dict = ApplicationCommandResponse.from_dict(application_command_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandResponseOptionsInner.md b/docs/ApplicationCommandResponseOptionsInner.md new file mode 100644 index 0000000..2d856f0 --- /dev/null +++ b/docs/ApplicationCommandResponseOptionsInner.md @@ -0,0 +1,44 @@ +# ApplicationCommandResponseOptionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoiceResponse]**](ApplicationCommandOptionStringChoiceResponse.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOptionResponseOptionsInner]**](ApplicationCommandSubcommandOptionResponseOptionsInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandResponseOptionsInner from a JSON string +application_command_response_options_inner_instance = ApplicationCommandResponseOptionsInner.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandResponseOptionsInner.to_json()) + +# convert the object into a dict +application_command_response_options_inner_dict = application_command_response_options_inner_instance.to_dict() +# create an instance of ApplicationCommandResponseOptionsInner from a dict +application_command_response_options_inner_from_dict = ApplicationCommandResponseOptionsInner.from_dict(application_command_response_options_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandRoleOption.md b/docs/ApplicationCommandRoleOption.md new file mode 100644 index 0000000..e047a5d --- /dev/null +++ b/docs/ApplicationCommandRoleOption.md @@ -0,0 +1,34 @@ +# ApplicationCommandRoleOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandRoleOption from a JSON string +application_command_role_option_instance = ApplicationCommandRoleOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandRoleOption.to_json()) + +# convert the object into a dict +application_command_role_option_dict = application_command_role_option_instance.to_dict() +# create an instance of ApplicationCommandRoleOption from a dict +application_command_role_option_from_dict = ApplicationCommandRoleOption.from_dict(application_command_role_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandRoleOptionResponse.md b/docs/ApplicationCommandRoleOptionResponse.md new file mode 100644 index 0000000..5b7891e --- /dev/null +++ b/docs/ApplicationCommandRoleOptionResponse.md @@ -0,0 +1,36 @@ +# ApplicationCommandRoleOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandRoleOptionResponse from a JSON string +application_command_role_option_response_instance = ApplicationCommandRoleOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandRoleOptionResponse.to_json()) + +# convert the object into a dict +application_command_role_option_response_dict = application_command_role_option_response_instance.to_dict() +# create an instance of ApplicationCommandRoleOptionResponse from a dict +application_command_role_option_response_from_dict = ApplicationCommandRoleOptionResponse.from_dict(application_command_role_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandStringOption.md b/docs/ApplicationCommandStringOption.md new file mode 100644 index 0000000..29eba24 --- /dev/null +++ b/docs/ApplicationCommandStringOption.md @@ -0,0 +1,38 @@ +# ApplicationCommandStringOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoice]**](ApplicationCommandOptionStringChoice.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandStringOption from a JSON string +application_command_string_option_instance = ApplicationCommandStringOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandStringOption.to_json()) + +# convert the object into a dict +application_command_string_option_dict = application_command_string_option_instance.to_dict() +# create an instance of ApplicationCommandStringOption from a dict +application_command_string_option_from_dict = ApplicationCommandStringOption.from_dict(application_command_string_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandStringOptionResponse.md b/docs/ApplicationCommandStringOptionResponse.md new file mode 100644 index 0000000..cf2b928 --- /dev/null +++ b/docs/ApplicationCommandStringOptionResponse.md @@ -0,0 +1,40 @@ +# ApplicationCommandStringOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoiceResponse]**](ApplicationCommandOptionStringChoiceResponse.md) | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandStringOptionResponse from a JSON string +application_command_string_option_response_instance = ApplicationCommandStringOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandStringOptionResponse.to_json()) + +# convert the object into a dict +application_command_string_option_response_dict = application_command_string_option_response_instance.to_dict() +# create an instance of ApplicationCommandStringOptionResponse from a dict +application_command_string_option_response_from_dict = ApplicationCommandStringOptionResponse.from_dict(application_command_string_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandGroupOption.md b/docs/ApplicationCommandSubcommandGroupOption.md new file mode 100644 index 0000000..01b531f --- /dev/null +++ b/docs/ApplicationCommandSubcommandGroupOption.md @@ -0,0 +1,35 @@ +# ApplicationCommandSubcommandGroupOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOption]**](ApplicationCommandSubcommandOption.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandGroupOption from a JSON string +application_command_subcommand_group_option_instance = ApplicationCommandSubcommandGroupOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandGroupOption.to_json()) + +# convert the object into a dict +application_command_subcommand_group_option_dict = application_command_subcommand_group_option_instance.to_dict() +# create an instance of ApplicationCommandSubcommandGroupOption from a dict +application_command_subcommand_group_option_from_dict = ApplicationCommandSubcommandGroupOption.from_dict(application_command_subcommand_group_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandGroupOptionResponse.md b/docs/ApplicationCommandSubcommandGroupOptionResponse.md new file mode 100644 index 0000000..c35733d --- /dev/null +++ b/docs/ApplicationCommandSubcommandGroupOptionResponse.md @@ -0,0 +1,37 @@ +# ApplicationCommandSubcommandGroupOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOptionResponse]**](ApplicationCommandSubcommandOptionResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandGroupOptionResponse from a JSON string +application_command_subcommand_group_option_response_instance = ApplicationCommandSubcommandGroupOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandGroupOptionResponse.to_json()) + +# convert the object into a dict +application_command_subcommand_group_option_response_dict = application_command_subcommand_group_option_response_instance.to_dict() +# create an instance of ApplicationCommandSubcommandGroupOptionResponse from a dict +application_command_subcommand_group_option_response_from_dict = ApplicationCommandSubcommandGroupOptionResponse.from_dict(application_command_subcommand_group_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandOption.md b/docs/ApplicationCommandSubcommandOption.md new file mode 100644 index 0000000..ff02d71 --- /dev/null +++ b/docs/ApplicationCommandSubcommandOption.md @@ -0,0 +1,35 @@ +# ApplicationCommandSubcommandOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOptionOptionsInner]**](ApplicationCommandSubcommandOptionOptionsInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandOption from a JSON string +application_command_subcommand_option_instance = ApplicationCommandSubcommandOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandOption.to_json()) + +# convert the object into a dict +application_command_subcommand_option_dict = application_command_subcommand_option_instance.to_dict() +# create an instance of ApplicationCommandSubcommandOption from a dict +application_command_subcommand_option_from_dict = ApplicationCommandSubcommandOption.from_dict(application_command_subcommand_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandOptionOptionsInner.md b/docs/ApplicationCommandSubcommandOptionOptionsInner.md new file mode 100644 index 0000000..0b283a6 --- /dev/null +++ b/docs/ApplicationCommandSubcommandOptionOptionsInner.md @@ -0,0 +1,41 @@ +# ApplicationCommandSubcommandOptionOptionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoice]**](ApplicationCommandOptionStringChoice.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandOptionOptionsInner from a JSON string +application_command_subcommand_option_options_inner_instance = ApplicationCommandSubcommandOptionOptionsInner.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandOptionOptionsInner.to_json()) + +# convert the object into a dict +application_command_subcommand_option_options_inner_dict = application_command_subcommand_option_options_inner_instance.to_dict() +# create an instance of ApplicationCommandSubcommandOptionOptionsInner from a dict +application_command_subcommand_option_options_inner_from_dict = ApplicationCommandSubcommandOptionOptionsInner.from_dict(application_command_subcommand_option_options_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandOptionResponse.md b/docs/ApplicationCommandSubcommandOptionResponse.md new file mode 100644 index 0000000..cb6d3f4 --- /dev/null +++ b/docs/ApplicationCommandSubcommandOptionResponse.md @@ -0,0 +1,37 @@ +# ApplicationCommandSubcommandOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**options** | [**List[ApplicationCommandSubcommandOptionResponseOptionsInner]**](ApplicationCommandSubcommandOptionResponseOptionsInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandOptionResponse from a JSON string +application_command_subcommand_option_response_instance = ApplicationCommandSubcommandOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandOptionResponse.to_json()) + +# convert the object into a dict +application_command_subcommand_option_response_dict = application_command_subcommand_option_response_instance.to_dict() +# create an instance of ApplicationCommandSubcommandOptionResponse from a dict +application_command_subcommand_option_response_from_dict = ApplicationCommandSubcommandOptionResponse.from_dict(application_command_subcommand_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md b/docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md new file mode 100644 index 0000000..2b386d5 --- /dev/null +++ b/docs/ApplicationCommandSubcommandOptionResponseOptionsInner.md @@ -0,0 +1,43 @@ +# ApplicationCommandSubcommandOptionResponseOptionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] +**autocomplete** | **bool** | | [optional] +**choices** | [**List[ApplicationCommandOptionStringChoiceResponse]**](ApplicationCommandOptionStringChoiceResponse.md) | | [optional] +**min_value** | **float** | | [optional] +**max_value** | **float** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandSubcommandOptionResponseOptionsInner from a JSON string +application_command_subcommand_option_response_options_inner_instance = ApplicationCommandSubcommandOptionResponseOptionsInner.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandSubcommandOptionResponseOptionsInner.to_json()) + +# convert the object into a dict +application_command_subcommand_option_response_options_inner_dict = application_command_subcommand_option_response_options_inner_instance.to_dict() +# create an instance of ApplicationCommandSubcommandOptionResponseOptionsInner from a dict +application_command_subcommand_option_response_options_inner_from_dict = ApplicationCommandSubcommandOptionResponseOptionsInner.from_dict(application_command_subcommand_option_response_options_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandUpdateRequest.md b/docs/ApplicationCommandUpdateRequest.md new file mode 100644 index 0000000..69c22d4 --- /dev/null +++ b/docs/ApplicationCommandUpdateRequest.md @@ -0,0 +1,40 @@ +# ApplicationCommandUpdateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**options** | [**List[ApplicationCommandCreateRequestOptionsInner]**](ApplicationCommandCreateRequestOptionsInner.md) | | [optional] +**default_member_permissions** | **int** | | [optional] +**dm_permission** | **bool** | | [optional] +**contexts** | **List[int]** | | [optional] +**integration_types** | **List[int]** | | [optional] +**handler** | **int** | | [optional] +**type** | **int** | | [optional] +**id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandUpdateRequest from a JSON string +application_command_update_request_instance = ApplicationCommandUpdateRequest.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandUpdateRequest.to_json()) + +# convert the object into a dict +application_command_update_request_dict = application_command_update_request_instance.to_dict() +# create an instance of ApplicationCommandUpdateRequest from a dict +application_command_update_request_from_dict = ApplicationCommandUpdateRequest.from_dict(application_command_update_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandUserOption.md b/docs/ApplicationCommandUserOption.md new file mode 100644 index 0000000..dbc199c --- /dev/null +++ b/docs/ApplicationCommandUserOption.md @@ -0,0 +1,34 @@ +# ApplicationCommandUserOption + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandUserOption from a JSON string +application_command_user_option_instance = ApplicationCommandUserOption.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandUserOption.to_json()) + +# convert the object into a dict +application_command_user_option_dict = application_command_user_option_instance.to_dict() +# create an instance of ApplicationCommandUserOption from a dict +application_command_user_option_from_dict = ApplicationCommandUserOption.from_dict(application_command_user_option_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCommandUserOptionResponse.md b/docs/ApplicationCommandUserOptionResponse.md new file mode 100644 index 0000000..856c168 --- /dev/null +++ b/docs/ApplicationCommandUserOptionResponse.md @@ -0,0 +1,36 @@ +# ApplicationCommandUserOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**name** | **str** | | +**name_localized** | **str** | | [optional] +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localized** | **str** | | [optional] +**description_localizations** | **Dict[str, str]** | | [optional] +**required** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationCommandUserOptionResponse from a JSON string +application_command_user_option_response_instance = ApplicationCommandUserOptionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationCommandUserOptionResponse.to_json()) + +# convert the object into a dict +application_command_user_option_response_dict = application_command_user_option_response_instance.to_dict() +# create an instance of ApplicationCommandUserOptionResponse from a dict +application_command_user_option_response_from_dict = ApplicationCommandUserOptionResponse.from_dict(application_command_user_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationFormPartial.md b/docs/ApplicationFormPartial.md new file mode 100644 index 0000000..d601c88 --- /dev/null +++ b/docs/ApplicationFormPartial.md @@ -0,0 +1,42 @@ +# ApplicationFormPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | [**ApplicationFormPartialDescription**](ApplicationFormPartialDescription.md) | | [optional] +**icon** | **str** | | [optional] +**cover_image** | **str** | | [optional] +**team_id** | **str** | | [optional] +**flags** | **int** | | [optional] +**interactions_endpoint_url** | **str** | | [optional] +**explicit_content_filter** | **int** | | [optional] +**max_participants** | **int** | | [optional] +**type** | **int** | | [optional] +**tags** | **List[str]** | | [optional] +**custom_install_url** | **str** | | [optional] +**install_params** | [**ApplicationOAuth2InstallParams**](ApplicationOAuth2InstallParams.md) | | [optional] +**role_connections_verification_url** | **str** | | [optional] +**integration_types_config** | [**Dict[str, ApplicationFormPartialIntegrationTypesConfigValue]**](ApplicationFormPartialIntegrationTypesConfigValue.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_form_partial import ApplicationFormPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationFormPartial from a JSON string +application_form_partial_instance = ApplicationFormPartial.from_json(json) +# print the JSON string representation of the object +print(ApplicationFormPartial.to_json()) + +# convert the object into a dict +application_form_partial_dict = application_form_partial_instance.to_dict() +# create an instance of ApplicationFormPartial from a dict +application_form_partial_from_dict = ApplicationFormPartial.from_dict(application_form_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationFormPartialDescription.md b/docs/ApplicationFormPartialDescription.md new file mode 100644 index 0000000..8b0c0d3 --- /dev/null +++ b/docs/ApplicationFormPartialDescription.md @@ -0,0 +1,30 @@ +# ApplicationFormPartialDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default** | **str** | | +**localizations** | **Dict[str, str]** | | [optional] + +## Example + +```python +from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationFormPartialDescription from a JSON string +application_form_partial_description_instance = ApplicationFormPartialDescription.from_json(json) +# print the JSON string representation of the object +print(ApplicationFormPartialDescription.to_json()) + +# convert the object into a dict +application_form_partial_description_dict = application_form_partial_description_instance.to_dict() +# create an instance of ApplicationFormPartialDescription from a dict +application_form_partial_description_from_dict = ApplicationFormPartialDescription.from_dict(application_form_partial_description_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationFormPartialIntegrationTypesConfigValue.md b/docs/ApplicationFormPartialIntegrationTypesConfigValue.md new file mode 100644 index 0000000..39b8930 --- /dev/null +++ b/docs/ApplicationFormPartialIntegrationTypesConfigValue.md @@ -0,0 +1,29 @@ +# ApplicationFormPartialIntegrationTypesConfigValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oauth2_install_params** | [**ApplicationOAuth2InstallParams**](ApplicationOAuth2InstallParams.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationFormPartialIntegrationTypesConfigValue from a JSON string +application_form_partial_integration_types_config_value_instance = ApplicationFormPartialIntegrationTypesConfigValue.from_json(json) +# print the JSON string representation of the object +print(ApplicationFormPartialIntegrationTypesConfigValue.to_json()) + +# convert the object into a dict +application_form_partial_integration_types_config_value_dict = application_form_partial_integration_types_config_value_instance.to_dict() +# create an instance of ApplicationFormPartialIntegrationTypesConfigValue from a dict +application_form_partial_integration_types_config_value_from_dict = ApplicationFormPartialIntegrationTypesConfigValue.from_dict(application_form_partial_integration_types_config_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationIncomingWebhookResponse.md b/docs/ApplicationIncomingWebhookResponse.md new file mode 100644 index 0000000..767adb0 --- /dev/null +++ b/docs/ApplicationIncomingWebhookResponse.md @@ -0,0 +1,36 @@ +# ApplicationIncomingWebhookResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | [optional] +**avatar** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**id** | **str** | | +**name** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationIncomingWebhookResponse from a JSON string +application_incoming_webhook_response_instance = ApplicationIncomingWebhookResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationIncomingWebhookResponse.to_json()) + +# convert the object into a dict +application_incoming_webhook_response_dict = application_incoming_webhook_response_instance.to_dict() +# create an instance of ApplicationIncomingWebhookResponse from a dict +application_incoming_webhook_response_from_dict = ApplicationIncomingWebhookResponse.from_dict(application_incoming_webhook_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationIntegrationTypeConfiguration.md b/docs/ApplicationIntegrationTypeConfiguration.md new file mode 100644 index 0000000..a45f005 --- /dev/null +++ b/docs/ApplicationIntegrationTypeConfiguration.md @@ -0,0 +1,29 @@ +# ApplicationIntegrationTypeConfiguration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oauth2_install_params** | [**ApplicationOAuth2InstallParams**](ApplicationOAuth2InstallParams.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationIntegrationTypeConfiguration from a JSON string +application_integration_type_configuration_instance = ApplicationIntegrationTypeConfiguration.from_json(json) +# print the JSON string representation of the object +print(ApplicationIntegrationTypeConfiguration.to_json()) + +# convert the object into a dict +application_integration_type_configuration_dict = application_integration_type_configuration_instance.to_dict() +# create an instance of ApplicationIntegrationTypeConfiguration from a dict +application_integration_type_configuration_from_dict = ApplicationIntegrationTypeConfiguration.from_dict(application_integration_type_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationIntegrationTypeConfigurationResponse.md b/docs/ApplicationIntegrationTypeConfigurationResponse.md new file mode 100644 index 0000000..60084ce --- /dev/null +++ b/docs/ApplicationIntegrationTypeConfigurationResponse.md @@ -0,0 +1,29 @@ +# ApplicationIntegrationTypeConfigurationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oauth2_install_params** | [**ApplicationOAuth2InstallParamsResponse**](ApplicationOAuth2InstallParamsResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationIntegrationTypeConfigurationResponse from a JSON string +application_integration_type_configuration_response_instance = ApplicationIntegrationTypeConfigurationResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationIntegrationTypeConfigurationResponse.to_json()) + +# convert the object into a dict +application_integration_type_configuration_response_dict = application_integration_type_configuration_response_instance.to_dict() +# create an instance of ApplicationIntegrationTypeConfigurationResponse from a dict +application_integration_type_configuration_response_from_dict = ApplicationIntegrationTypeConfigurationResponse.from_dict(application_integration_type_configuration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationOAuth2InstallParams.md b/docs/ApplicationOAuth2InstallParams.md new file mode 100644 index 0000000..d89bbb4 --- /dev/null +++ b/docs/ApplicationOAuth2InstallParams.md @@ -0,0 +1,30 @@ +# ApplicationOAuth2InstallParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scopes** | **List[str]** | | [optional] +**permissions** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationOAuth2InstallParams from a JSON string +application_o_auth2_install_params_instance = ApplicationOAuth2InstallParams.from_json(json) +# print the JSON string representation of the object +print(ApplicationOAuth2InstallParams.to_json()) + +# convert the object into a dict +application_o_auth2_install_params_dict = application_o_auth2_install_params_instance.to_dict() +# create an instance of ApplicationOAuth2InstallParams from a dict +application_o_auth2_install_params_from_dict = ApplicationOAuth2InstallParams.from_dict(application_o_auth2_install_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationOAuth2InstallParamsResponse.md b/docs/ApplicationOAuth2InstallParamsResponse.md new file mode 100644 index 0000000..b6c06e1 --- /dev/null +++ b/docs/ApplicationOAuth2InstallParamsResponse.md @@ -0,0 +1,30 @@ +# ApplicationOAuth2InstallParamsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scopes** | **List[str]** | | +**permissions** | **str** | | + +## Example + +```python +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationOAuth2InstallParamsResponse from a JSON string +application_o_auth2_install_params_response_instance = ApplicationOAuth2InstallParamsResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationOAuth2InstallParamsResponse.to_json()) + +# convert the object into a dict +application_o_auth2_install_params_response_dict = application_o_auth2_install_params_response_instance.to_dict() +# create an instance of ApplicationOAuth2InstallParamsResponse from a dict +application_o_auth2_install_params_response_from_dict = ApplicationOAuth2InstallParamsResponse.from_dict(application_o_auth2_install_params_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationResponse.md b/docs/ApplicationResponse.md new file mode 100644 index 0000000..fbc0fb1 --- /dev/null +++ b/docs/ApplicationResponse.md @@ -0,0 +1,50 @@ +# ApplicationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | +**type** | **int** | | [optional] +**cover_image** | **str** | | [optional] +**primary_sku_id** | **str** | | [optional] +**bot** | [**UserResponse**](UserResponse.md) | | [optional] +**slug** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**rpc_origins** | **List[Optional[str]]** | | [optional] +**bot_public** | **bool** | | [optional] +**bot_require_code_grant** | **bool** | | [optional] +**terms_of_service_url** | **str** | | [optional] +**privacy_policy_url** | **str** | | [optional] +**custom_install_url** | **str** | | [optional] +**install_params** | [**ApplicationOAuth2InstallParamsResponse**](ApplicationOAuth2InstallParamsResponse.md) | | [optional] +**integration_types_config** | [**Dict[str, ApplicationIntegrationTypeConfigurationResponse]**](ApplicationIntegrationTypeConfigurationResponse.md) | | [optional] +**verify_key** | **str** | | +**flags** | **int** | | +**max_participants** | **int** | | [optional] +**tags** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.application_response import ApplicationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationResponse from a JSON string +application_response_instance = ApplicationResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationResponse.to_json()) + +# convert the object into a dict +application_response_dict = application_response_instance.to_dict() +# create an instance of ApplicationResponse from a dict +application_response_from_dict = ApplicationResponse.from_dict(application_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationRoleConnectionsMetadataItemRequest.md b/docs/ApplicationRoleConnectionsMetadataItemRequest.md new file mode 100644 index 0000000..af44cb9 --- /dev/null +++ b/docs/ApplicationRoleConnectionsMetadataItemRequest.md @@ -0,0 +1,34 @@ +# ApplicationRoleConnectionsMetadataItemRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**key** | **str** | | +**name** | **str** | | +**name_localizations** | **Dict[str, Optional[str]]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, Optional[str]]** | | [optional] + +## Example + +```python +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationRoleConnectionsMetadataItemRequest from a JSON string +application_role_connections_metadata_item_request_instance = ApplicationRoleConnectionsMetadataItemRequest.from_json(json) +# print the JSON string representation of the object +print(ApplicationRoleConnectionsMetadataItemRequest.to_json()) + +# convert the object into a dict +application_role_connections_metadata_item_request_dict = application_role_connections_metadata_item_request_instance.to_dict() +# create an instance of ApplicationRoleConnectionsMetadataItemRequest from a dict +application_role_connections_metadata_item_request_from_dict = ApplicationRoleConnectionsMetadataItemRequest.from_dict(application_role_connections_metadata_item_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationRoleConnectionsMetadataItemResponse.md b/docs/ApplicationRoleConnectionsMetadataItemResponse.md new file mode 100644 index 0000000..90974f9 --- /dev/null +++ b/docs/ApplicationRoleConnectionsMetadataItemResponse.md @@ -0,0 +1,34 @@ +# ApplicationRoleConnectionsMetadataItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**key** | **str** | | +**name** | **str** | | +**name_localizations** | **Dict[str, str]** | | [optional] +**description** | **str** | | +**description_localizations** | **Dict[str, str]** | | [optional] + +## Example + +```python +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationRoleConnectionsMetadataItemResponse from a JSON string +application_role_connections_metadata_item_response_instance = ApplicationRoleConnectionsMetadataItemResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationRoleConnectionsMetadataItemResponse.to_json()) + +# convert the object into a dict +application_role_connections_metadata_item_response_dict = application_role_connections_metadata_item_response_instance.to_dict() +# create an instance of ApplicationRoleConnectionsMetadataItemResponse from a dict +application_role_connections_metadata_item_response_from_dict = ApplicationRoleConnectionsMetadataItemResponse.from_dict(application_role_connections_metadata_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationUserRoleConnectionResponse.md b/docs/ApplicationUserRoleConnectionResponse.md new file mode 100644 index 0000000..b6ca7d1 --- /dev/null +++ b/docs/ApplicationUserRoleConnectionResponse.md @@ -0,0 +1,31 @@ +# ApplicationUserRoleConnectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**platform_name** | **str** | | [optional] +**platform_username** | **str** | | [optional] +**metadata** | **Dict[str, str]** | | [optional] + +## Example + +```python +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationUserRoleConnectionResponse from a JSON string +application_user_role_connection_response_instance = ApplicationUserRoleConnectionResponse.from_json(json) +# print the JSON string representation of the object +print(ApplicationUserRoleConnectionResponse.to_json()) + +# convert the object into a dict +application_user_role_connection_response_dict = application_user_role_connection_response_instance.to_dict() +# create an instance of ApplicationUserRoleConnectionResponse from a dict +application_user_role_connection_response_from_dict = ApplicationUserRoleConnectionResponse.from_dict(application_user_role_connection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttachmentResponse.md b/docs/AttachmentResponse.md new file mode 100644 index 0000000..9f18f3e --- /dev/null +++ b/docs/AttachmentResponse.md @@ -0,0 +1,44 @@ +# AttachmentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**filename** | **str** | | +**size** | **int** | | +**url** | **str** | | +**proxy_url** | **str** | | +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**duration_secs** | **float** | | [optional] +**waveform** | **str** | | [optional] +**description** | **str** | | [optional] +**content_type** | **str** | | [optional] +**ephemeral** | **bool** | | [optional] +**title** | **str** | | [optional] +**application** | [**ApplicationResponse**](ApplicationResponse.md) | | [optional] +**clip_created_at** | **datetime** | | [optional] +**clip_participants** | [**List[UserResponse]**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.attachment_response import AttachmentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AttachmentResponse from a JSON string +attachment_response_instance = AttachmentResponse.from_json(json) +# print the JSON string representation of the object +print(AttachmentResponse.to_json()) + +# convert the object into a dict +attachment_response_dict = attachment_response_instance.to_dict() +# create an instance of AttachmentResponse from a dict +attachment_response_from_dict = AttachmentResponse.from_dict(attachment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuditLogEntryResponse.md b/docs/AuditLogEntryResponse.md new file mode 100644 index 0000000..100c51d --- /dev/null +++ b/docs/AuditLogEntryResponse.md @@ -0,0 +1,35 @@ +# AuditLogEntryResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**action_type** | **int** | | +**user_id** | **str** | | [optional] +**target_id** | **str** | | [optional] +**changes** | [**List[AuditLogObjectChangeResponse]**](AuditLogObjectChangeResponse.md) | | [optional] +**options** | **Dict[str, str]** | | [optional] +**reason** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AuditLogEntryResponse from a JSON string +audit_log_entry_response_instance = AuditLogEntryResponse.from_json(json) +# print the JSON string representation of the object +print(AuditLogEntryResponse.to_json()) + +# convert the object into a dict +audit_log_entry_response_dict = audit_log_entry_response_instance.to_dict() +# create an instance of AuditLogEntryResponse from a dict +audit_log_entry_response_from_dict = AuditLogEntryResponse.from_dict(audit_log_entry_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuditLogObjectChangeResponse.md b/docs/AuditLogObjectChangeResponse.md new file mode 100644 index 0000000..338f18a --- /dev/null +++ b/docs/AuditLogObjectChangeResponse.md @@ -0,0 +1,31 @@ +# AuditLogObjectChangeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | | [optional] +**new_value** | **object** | | [optional] +**old_value** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AuditLogObjectChangeResponse from a JSON string +audit_log_object_change_response_instance = AuditLogObjectChangeResponse.from_json(json) +# print the JSON string representation of the object +print(AuditLogObjectChangeResponse.to_json()) + +# convert the object into a dict +audit_log_object_change_response_dict = audit_log_object_change_response_instance.to_dict() +# create an instance of AuditLogObjectChangeResponse from a dict +audit_log_object_change_response_from_dict = AuditLogObjectChangeResponse.from_dict(audit_log_object_change_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BanUserFromGuildRequest.md b/docs/BanUserFromGuildRequest.md new file mode 100644 index 0000000..504826c --- /dev/null +++ b/docs/BanUserFromGuildRequest.md @@ -0,0 +1,30 @@ +# BanUserFromGuildRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delete_message_seconds** | **int** | | [optional] +**delete_message_days** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BanUserFromGuildRequest from a JSON string +ban_user_from_guild_request_instance = BanUserFromGuildRequest.from_json(json) +# print the JSON string representation of the object +print(BanUserFromGuildRequest.to_json()) + +# convert the object into a dict +ban_user_from_guild_request_dict = ban_user_from_guild_request_instance.to_dict() +# create an instance of BanUserFromGuildRequest from a dict +ban_user_from_guild_request_from_dict = BanUserFromGuildRequest.from_dict(ban_user_from_guild_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseCreateMessageCreateRequest.md b/docs/BaseCreateMessageCreateRequest.md new file mode 100644 index 0000000..369b849 --- /dev/null +++ b/docs/BaseCreateMessageCreateRequest.md @@ -0,0 +1,37 @@ +# BaseCreateMessageCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**sticker_ids** | **List[str]** | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**flags** | **int** | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**confetti_potion** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseCreateMessageCreateRequest from a JSON string +base_create_message_create_request_instance = BaseCreateMessageCreateRequest.from_json(json) +# print the JSON string representation of the object +print(BaseCreateMessageCreateRequest.to_json()) + +# convert the object into a dict +base_create_message_create_request_dict = base_create_message_create_request_instance.to_dict() +# create an instance of BaseCreateMessageCreateRequest from a dict +base_create_message_create_request_from_dict = BaseCreateMessageCreateRequest.from_dict(base_create_message_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseCreateMessageCreateRequestComponentsInner.md b/docs/BaseCreateMessageCreateRequestComponentsInner.md new file mode 100644 index 0000000..e4c5214 --- /dev/null +++ b/docs/BaseCreateMessageCreateRequestComponentsInner.md @@ -0,0 +1,38 @@ +# BaseCreateMessageCreateRequestComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**components** | [**List[TextDisplayComponentForMessageRequest]**](TextDisplayComponentForMessageRequest.md) | | +**accent_color** | **int** | | [optional] +**spoiler** | **bool** | | [optional] +**file** | [**UnfurledMediaRequestWithAttachmentReferenceRequired**](UnfurledMediaRequestWithAttachmentReferenceRequired.md) | | +**items** | [**List[MediaGalleryItemRequest]**](MediaGalleryItemRequest.md) | | +**accessory** | [**SectionComponentForMessageRequestAccessory**](SectionComponentForMessageRequestAccessory.md) | | +**spacing** | **int** | | [optional] +**divider** | **bool** | | [optional] +**content** | **str** | | + +## Example + +```python +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseCreateMessageCreateRequestComponentsInner from a JSON string +base_create_message_create_request_components_inner_instance = BaseCreateMessageCreateRequestComponentsInner.from_json(json) +# print the JSON string representation of the object +print(BaseCreateMessageCreateRequestComponentsInner.to_json()) + +# convert the object into a dict +base_create_message_create_request_components_inner_dict = base_create_message_create_request_components_inner_instance.to_dict() +# create an instance of BaseCreateMessageCreateRequestComponentsInner from a dict +base_create_message_create_request_components_inner_from_dict = BaseCreateMessageCreateRequestComponentsInner.from_dict(base_create_message_create_request_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BasicApplicationResponse.md b/docs/BasicApplicationResponse.md new file mode 100644 index 0000000..f3ae55f --- /dev/null +++ b/docs/BasicApplicationResponse.md @@ -0,0 +1,36 @@ +# BasicApplicationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | +**type** | **int** | | [optional] +**cover_image** | **str** | | [optional] +**primary_sku_id** | **str** | | [optional] +**bot** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.basic_application_response import BasicApplicationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicApplicationResponse from a JSON string +basic_application_response_instance = BasicApplicationResponse.from_json(json) +# print the JSON string representation of the object +print(BasicApplicationResponse.to_json()) + +# convert the object into a dict +basic_application_response_dict = basic_application_response_instance.to_dict() +# create an instance of BasicApplicationResponse from a dict +basic_application_response_from_dict = BasicApplicationResponse.from_dict(basic_application_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BasicMessageResponse.md b/docs/BasicMessageResponse.md new file mode 100644 index 0000000..34792ac --- /dev/null +++ b/docs/BasicMessageResponse.md @@ -0,0 +1,63 @@ +# BasicMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**content** | **str** | | +**mentions** | [**List[UserResponse]**](UserResponse.md) | | +**mention_roles** | **List[str]** | | +**attachments** | [**List[MessageAttachmentResponse]**](MessageAttachmentResponse.md) | | +**embeds** | [**List[MessageEmbedResponse]**](MessageEmbedResponse.md) | | +**timestamp** | **datetime** | | +**edited_timestamp** | **datetime** | | [optional] +**flags** | **int** | | +**components** | [**List[BasicMessageResponseComponentsInner]**](BasicMessageResponseComponentsInner.md) | | +**resolved** | [**ResolvedObjectsResponse**](ResolvedObjectsResponse.md) | | [optional] +**stickers** | [**List[GetSticker200Response]**](GetSticker200Response.md) | | [optional] +**sticker_items** | [**List[MessageStickerItemResponse]**](MessageStickerItemResponse.md) | | [optional] +**id** | **str** | | +**channel_id** | **str** | | +**author** | [**UserResponse**](UserResponse.md) | | +**pinned** | **bool** | | +**mention_everyone** | **bool** | | +**tts** | **bool** | | +**call** | [**MessageCallResponse**](MessageCallResponse.md) | | [optional] +**activity** | **object** | | [optional] +**application** | [**BasicApplicationResponse**](BasicApplicationResponse.md) | | [optional] +**application_id** | **str** | | [optional] +**interaction** | [**MessageInteractionResponse**](MessageInteractionResponse.md) | | [optional] +**nonce** | [**BasicMessageResponseNonce**](BasicMessageResponseNonce.md) | | [optional] +**webhook_id** | **str** | | [optional] +**message_reference** | [**MessageReferenceResponse**](MessageReferenceResponse.md) | | [optional] +**thread** | [**ThreadResponse**](ThreadResponse.md) | | [optional] +**mention_channels** | [**List[Optional[MessageMentionChannelResponse]]**](MessageMentionChannelResponse.md) | | [optional] +**role_subscription_data** | [**MessageRoleSubscriptionDataResponse**](MessageRoleSubscriptionDataResponse.md) | | [optional] +**purchase_notification** | [**PurchaseNotificationResponse**](PurchaseNotificationResponse.md) | | [optional] +**position** | **int** | | [optional] +**poll** | [**PollResponse**](PollResponse.md) | | [optional] +**interaction_metadata** | [**BasicMessageResponseInteractionMetadata**](BasicMessageResponseInteractionMetadata.md) | | [optional] +**message_snapshots** | [**List[MessageSnapshotResponse]**](MessageSnapshotResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.basic_message_response import BasicMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicMessageResponse from a JSON string +basic_message_response_instance = BasicMessageResponse.from_json(json) +# print the JSON string representation of the object +print(BasicMessageResponse.to_json()) + +# convert the object into a dict +basic_message_response_dict = basic_message_response_instance.to_dict() +# create an instance of BasicMessageResponse from a dict +basic_message_response_from_dict = BasicMessageResponse.from_dict(basic_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BasicMessageResponseComponentsInner.md b/docs/BasicMessageResponseComponentsInner.md new file mode 100644 index 0000000..75202ea --- /dev/null +++ b/docs/BasicMessageResponseComponentsInner.md @@ -0,0 +1,41 @@ +# BasicMessageResponseComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**components** | [**List[TextDisplayComponentResponse]**](TextDisplayComponentResponse.md) | | +**accent_color** | **int** | | [optional] +**spoiler** | **bool** | | +**file** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**name** | **str** | | [optional] +**size** | **int** | | [optional] +**items** | [**List[MediaGalleryItemResponse]**](MediaGalleryItemResponse.md) | | +**accessory** | [**SectionComponentResponseAccessory**](SectionComponentResponseAccessory.md) | | +**spacing** | **int** | | +**divider** | **bool** | | +**content** | **str** | | + +## Example + +```python +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicMessageResponseComponentsInner from a JSON string +basic_message_response_components_inner_instance = BasicMessageResponseComponentsInner.from_json(json) +# print the JSON string representation of the object +print(BasicMessageResponseComponentsInner.to_json()) + +# convert the object into a dict +basic_message_response_components_inner_dict = basic_message_response_components_inner_instance.to_dict() +# create an instance of BasicMessageResponseComponentsInner from a dict +basic_message_response_components_inner_from_dict = BasicMessageResponseComponentsInner.from_dict(basic_message_response_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BasicMessageResponseInteractionMetadata.md b/docs/BasicMessageResponseInteractionMetadata.md new file mode 100644 index 0000000..5c9d536 --- /dev/null +++ b/docs/BasicMessageResponseInteractionMetadata.md @@ -0,0 +1,37 @@ +# BasicMessageResponseInteractionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**authorizing_integration_owners** | **Dict[str, str]** | | +**original_response_message_id** | **str** | | [optional] +**target_user** | [**UserResponse**](UserResponse.md) | | [optional] +**target_message_id** | **str** | | [optional] +**interacted_message_id** | **str** | | +**triggering_interaction_metadata** | [**ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata**](ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md) | | + +## Example + +```python +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicMessageResponseInteractionMetadata from a JSON string +basic_message_response_interaction_metadata_instance = BasicMessageResponseInteractionMetadata.from_json(json) +# print the JSON string representation of the object +print(BasicMessageResponseInteractionMetadata.to_json()) + +# convert the object into a dict +basic_message_response_interaction_metadata_dict = basic_message_response_interaction_metadata_instance.to_dict() +# create an instance of BasicMessageResponseInteractionMetadata from a dict +basic_message_response_interaction_metadata_from_dict = BasicMessageResponseInteractionMetadata.from_dict(basic_message_response_interaction_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BasicMessageResponseNonce.md b/docs/BasicMessageResponseNonce.md new file mode 100644 index 0000000..b512eac --- /dev/null +++ b/docs/BasicMessageResponseNonce.md @@ -0,0 +1,28 @@ +# BasicMessageResponseNonce + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicMessageResponseNonce from a JSON string +basic_message_response_nonce_instance = BasicMessageResponseNonce.from_json(json) +# print the JSON string representation of the object +print(BasicMessageResponseNonce.to_json()) + +# convert the object into a dict +basic_message_response_nonce_dict = basic_message_response_nonce_instance.to_dict() +# create an instance of BasicMessageResponseNonce from a dict +basic_message_response_nonce_from_dict = BasicMessageResponseNonce.from_dict(basic_message_response_nonce_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockMessageAction.md b/docs/BlockMessageAction.md new file mode 100644 index 0000000..5848301 --- /dev/null +++ b/docs/BlockMessageAction.md @@ -0,0 +1,30 @@ +# BlockMessageAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**BlockMessageActionMetadata**](BlockMessageActionMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.block_message_action import BlockMessageAction + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockMessageAction from a JSON string +block_message_action_instance = BlockMessageAction.from_json(json) +# print the JSON string representation of the object +print(BlockMessageAction.to_json()) + +# convert the object into a dict +block_message_action_dict = block_message_action_instance.to_dict() +# create an instance of BlockMessageAction from a dict +block_message_action_from_dict = BlockMessageAction.from_dict(block_message_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockMessageActionMetadata.md b/docs/BlockMessageActionMetadata.md new file mode 100644 index 0000000..baa591d --- /dev/null +++ b/docs/BlockMessageActionMetadata.md @@ -0,0 +1,29 @@ +# BlockMessageActionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_message** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockMessageActionMetadata from a JSON string +block_message_action_metadata_instance = BlockMessageActionMetadata.from_json(json) +# print the JSON string representation of the object +print(BlockMessageActionMetadata.to_json()) + +# convert the object into a dict +block_message_action_metadata_dict = block_message_action_metadata_instance.to_dict() +# create an instance of BlockMessageActionMetadata from a dict +block_message_action_metadata_from_dict = BlockMessageActionMetadata.from_dict(block_message_action_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockMessageActionMetadataResponse.md b/docs/BlockMessageActionMetadataResponse.md new file mode 100644 index 0000000..8e0da79 --- /dev/null +++ b/docs/BlockMessageActionMetadataResponse.md @@ -0,0 +1,29 @@ +# BlockMessageActionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_message** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockMessageActionMetadataResponse from a JSON string +block_message_action_metadata_response_instance = BlockMessageActionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(BlockMessageActionMetadataResponse.to_json()) + +# convert the object into a dict +block_message_action_metadata_response_dict = block_message_action_metadata_response_instance.to_dict() +# create an instance of BlockMessageActionMetadataResponse from a dict +block_message_action_metadata_response_from_dict = BlockMessageActionMetadataResponse.from_dict(block_message_action_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockMessageActionResponse.md b/docs/BlockMessageActionResponse.md new file mode 100644 index 0000000..15a95c9 --- /dev/null +++ b/docs/BlockMessageActionResponse.md @@ -0,0 +1,30 @@ +# BlockMessageActionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**BlockMessageActionMetadataResponse**](BlockMessageActionMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.block_message_action_response import BlockMessageActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockMessageActionResponse from a JSON string +block_message_action_response_instance = BlockMessageActionResponse.from_json(json) +# print the JSON string representation of the object +print(BlockMessageActionResponse.to_json()) + +# convert the object into a dict +block_message_action_response_dict = block_message_action_response_instance.to_dict() +# create an instance of BlockMessageActionResponse from a dict +block_message_action_response_from_dict = BlockMessageActionResponse.from_dict(block_message_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BotAccountPatchRequest.md b/docs/BotAccountPatchRequest.md new file mode 100644 index 0000000..711fd6a --- /dev/null +++ b/docs/BotAccountPatchRequest.md @@ -0,0 +1,31 @@ +# BotAccountPatchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**avatar** | **str** | | [optional] +**banner** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BotAccountPatchRequest from a JSON string +bot_account_patch_request_instance = BotAccountPatchRequest.from_json(json) +# print the JSON string representation of the object +print(BotAccountPatchRequest.to_json()) + +# convert the object into a dict +bot_account_patch_request_dict = bot_account_patch_request_instance.to_dict() +# create an instance of BotAccountPatchRequest from a dict +bot_account_patch_request_from_dict = BotAccountPatchRequest.from_dict(bot_account_patch_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkBanUsersFromGuildRequest.md b/docs/BulkBanUsersFromGuildRequest.md new file mode 100644 index 0000000..9a6168c --- /dev/null +++ b/docs/BulkBanUsersFromGuildRequest.md @@ -0,0 +1,30 @@ +# BulkBanUsersFromGuildRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_ids** | **List[str]** | | +**delete_message_seconds** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkBanUsersFromGuildRequest from a JSON string +bulk_ban_users_from_guild_request_instance = BulkBanUsersFromGuildRequest.from_json(json) +# print the JSON string representation of the object +print(BulkBanUsersFromGuildRequest.to_json()) + +# convert the object into a dict +bulk_ban_users_from_guild_request_dict = bulk_ban_users_from_guild_request_instance.to_dict() +# create an instance of BulkBanUsersFromGuildRequest from a dict +bulk_ban_users_from_guild_request_from_dict = BulkBanUsersFromGuildRequest.from_dict(bulk_ban_users_from_guild_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkBanUsersResponse.md b/docs/BulkBanUsersResponse.md new file mode 100644 index 0000000..2c1b8e0 --- /dev/null +++ b/docs/BulkBanUsersResponse.md @@ -0,0 +1,30 @@ +# BulkBanUsersResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**banned_users** | **List[str]** | | +**failed_users** | **List[str]** | | + +## Example + +```python +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkBanUsersResponse from a JSON string +bulk_ban_users_response_instance = BulkBanUsersResponse.from_json(json) +# print the JSON string representation of the object +print(BulkBanUsersResponse.to_json()) + +# convert the object into a dict +bulk_ban_users_response_dict = bulk_ban_users_response_instance.to_dict() +# create an instance of BulkBanUsersResponse from a dict +bulk_ban_users_response_from_dict = BulkBanUsersResponse.from_dict(bulk_ban_users_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkDeleteMessagesRequest.md b/docs/BulkDeleteMessagesRequest.md new file mode 100644 index 0000000..498e104 --- /dev/null +++ b/docs/BulkDeleteMessagesRequest.md @@ -0,0 +1,29 @@ +# BulkDeleteMessagesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messages** | **List[str]** | | + +## Example + +```python +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkDeleteMessagesRequest from a JSON string +bulk_delete_messages_request_instance = BulkDeleteMessagesRequest.from_json(json) +# print the JSON string representation of the object +print(BulkDeleteMessagesRequest.to_json()) + +# convert the object into a dict +bulk_delete_messages_request_dict = bulk_delete_messages_request_instance.to_dict() +# create an instance of BulkDeleteMessagesRequest from a dict +bulk_delete_messages_request_from_dict = BulkDeleteMessagesRequest.from_dict(bulk_delete_messages_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkLobbyMemberRequest.md b/docs/BulkLobbyMemberRequest.md new file mode 100644 index 0000000..16292d6 --- /dev/null +++ b/docs/BulkLobbyMemberRequest.md @@ -0,0 +1,32 @@ +# BulkLobbyMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**metadata** | **Dict[str, str]** | | [optional] +**flags** | **int** | | [optional] +**remove_member** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkLobbyMemberRequest from a JSON string +bulk_lobby_member_request_instance = BulkLobbyMemberRequest.from_json(json) +# print the JSON string representation of the object +print(BulkLobbyMemberRequest.to_json()) + +# convert the object into a dict +bulk_lobby_member_request_dict = bulk_lobby_member_request_instance.to_dict() +# create an instance of BulkLobbyMemberRequest from a dict +bulk_lobby_member_request_from_dict = BulkLobbyMemberRequest.from_dict(bulk_lobby_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkUpdateGuildChannelsRequestInner.md b/docs/BulkUpdateGuildChannelsRequestInner.md new file mode 100644 index 0000000..6a0e99c --- /dev/null +++ b/docs/BulkUpdateGuildChannelsRequestInner.md @@ -0,0 +1,32 @@ +# BulkUpdateGuildChannelsRequestInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**position** | **int** | | [optional] +**parent_id** | **str** | | [optional] +**lock_permissions** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkUpdateGuildChannelsRequestInner from a JSON string +bulk_update_guild_channels_request_inner_instance = BulkUpdateGuildChannelsRequestInner.from_json(json) +# print the JSON string representation of the object +print(BulkUpdateGuildChannelsRequestInner.to_json()) + +# convert the object into a dict +bulk_update_guild_channels_request_inner_dict = bulk_update_guild_channels_request_inner_instance.to_dict() +# create an instance of BulkUpdateGuildChannelsRequestInner from a dict +bulk_update_guild_channels_request_inner_from_dict = BulkUpdateGuildChannelsRequestInner.from_dict(bulk_update_guild_channels_request_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkUpdateGuildRolesRequestInner.md b/docs/BulkUpdateGuildRolesRequestInner.md new file mode 100644 index 0000000..e0b28db --- /dev/null +++ b/docs/BulkUpdateGuildRolesRequestInner.md @@ -0,0 +1,30 @@ +# BulkUpdateGuildRolesRequestInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**position** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkUpdateGuildRolesRequestInner from a JSON string +bulk_update_guild_roles_request_inner_instance = BulkUpdateGuildRolesRequestInner.from_json(json) +# print the JSON string representation of the object +print(BulkUpdateGuildRolesRequestInner.to_json()) + +# convert the object into a dict +bulk_update_guild_roles_request_inner_dict = bulk_update_guild_roles_request_inner_instance.to_dict() +# create an instance of BulkUpdateGuildRolesRequestInner from a dict +bulk_update_guild_roles_request_inner_from_dict = BulkUpdateGuildRolesRequestInner.from_dict(bulk_update_guild_roles_request_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ButtonComponentForMessageRequest.md b/docs/ButtonComponentForMessageRequest.md new file mode 100644 index 0000000..ab00722 --- /dev/null +++ b/docs/ButtonComponentForMessageRequest.md @@ -0,0 +1,36 @@ +# ButtonComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | [optional] +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] +**emoji** | [**ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ButtonComponentForMessageRequest from a JSON string +button_component_for_message_request_instance = ButtonComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ButtonComponentForMessageRequest.to_json()) + +# convert the object into a dict +button_component_for_message_request_dict = button_component_for_message_request_instance.to_dict() +# create an instance of ButtonComponentForMessageRequest from a dict +button_component_for_message_request_from_dict = ButtonComponentForMessageRequest.from_dict(button_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ButtonComponentResponse.md b/docs/ButtonComponentResponse.md new file mode 100644 index 0000000..9c89c7c --- /dev/null +++ b/docs/ButtonComponentResponse.md @@ -0,0 +1,37 @@ +# ButtonComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | [optional] +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**emoji** | [**ComponentEmojiResponse**](ComponentEmojiResponse.md) | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.button_component_response import ButtonComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ButtonComponentResponse from a JSON string +button_component_response_instance = ButtonComponentResponse.from_json(json) +# print the JSON string representation of the object +print(ButtonComponentResponse.to_json()) + +# convert the object into a dict +button_component_response_dict = button_component_response_instance.to_dict() +# create an instance of ButtonComponentResponse from a dict +button_component_response_from_dict = ButtonComponentResponse.from_dict(button_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelFollowerResponse.md b/docs/ChannelFollowerResponse.md new file mode 100644 index 0000000..69c1aca --- /dev/null +++ b/docs/ChannelFollowerResponse.md @@ -0,0 +1,30 @@ +# ChannelFollowerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | +**webhook_id** | **str** | | + +## Example + +```python +from dc_rest.models.channel_follower_response import ChannelFollowerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelFollowerResponse from a JSON string +channel_follower_response_instance = ChannelFollowerResponse.from_json(json) +# print the JSON string representation of the object +print(ChannelFollowerResponse.to_json()) + +# convert the object into a dict +channel_follower_response_dict = channel_follower_response_instance.to_dict() +# create an instance of ChannelFollowerResponse from a dict +channel_follower_response_from_dict = ChannelFollowerResponse.from_dict(channel_follower_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelFollowerWebhookResponse.md b/docs/ChannelFollowerWebhookResponse.md new file mode 100644 index 0000000..827f419 --- /dev/null +++ b/docs/ChannelFollowerWebhookResponse.md @@ -0,0 +1,38 @@ +# ChannelFollowerWebhookResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | [optional] +**avatar** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**id** | **str** | | +**name** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**source_guild** | [**WebhookSourceGuildResponse**](WebhookSourceGuildResponse.md) | | [optional] +**source_channel** | [**WebhookSourceChannelResponse**](WebhookSourceChannelResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelFollowerWebhookResponse from a JSON string +channel_follower_webhook_response_instance = ChannelFollowerWebhookResponse.from_json(json) +# print the JSON string representation of the object +print(ChannelFollowerWebhookResponse.to_json()) + +# convert the object into a dict +channel_follower_webhook_response_dict = channel_follower_webhook_response_instance.to_dict() +# create an instance of ChannelFollowerWebhookResponse from a dict +channel_follower_webhook_response_from_dict = ChannelFollowerWebhookResponse.from_dict(channel_follower_webhook_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelPermissionOverwriteRequest.md b/docs/ChannelPermissionOverwriteRequest.md new file mode 100644 index 0000000..77b1125 --- /dev/null +++ b/docs/ChannelPermissionOverwriteRequest.md @@ -0,0 +1,32 @@ +# ChannelPermissionOverwriteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | [optional] +**allow** | **int** | | [optional] +**deny** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelPermissionOverwriteRequest from a JSON string +channel_permission_overwrite_request_instance = ChannelPermissionOverwriteRequest.from_json(json) +# print the JSON string representation of the object +print(ChannelPermissionOverwriteRequest.to_json()) + +# convert the object into a dict +channel_permission_overwrite_request_dict = channel_permission_overwrite_request_instance.to_dict() +# create an instance of ChannelPermissionOverwriteRequest from a dict +channel_permission_overwrite_request_from_dict = ChannelPermissionOverwriteRequest.from_dict(channel_permission_overwrite_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelPermissionOverwriteResponse.md b/docs/ChannelPermissionOverwriteResponse.md new file mode 100644 index 0000000..e7cf8b9 --- /dev/null +++ b/docs/ChannelPermissionOverwriteResponse.md @@ -0,0 +1,32 @@ +# ChannelPermissionOverwriteResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**allow** | **str** | | +**deny** | **str** | | + +## Example + +```python +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelPermissionOverwriteResponse from a JSON string +channel_permission_overwrite_response_instance = ChannelPermissionOverwriteResponse.from_json(json) +# print the JSON string representation of the object +print(ChannelPermissionOverwriteResponse.to_json()) + +# convert the object into a dict +channel_permission_overwrite_response_dict = channel_permission_overwrite_response_instance.to_dict() +# create an instance of ChannelPermissionOverwriteResponse from a dict +channel_permission_overwrite_response_from_dict = ChannelPermissionOverwriteResponse.from_dict(channel_permission_overwrite_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelSelectComponentForMessageRequest.md b/docs/ChannelSelectComponentForMessageRequest.md new file mode 100644 index 0000000..782d28e --- /dev/null +++ b/docs/ChannelSelectComponentForMessageRequest.md @@ -0,0 +1,36 @@ +# ChannelSelectComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[ChannelSelectDefaultValue]**](ChannelSelectDefaultValue.md) | | [optional] +**channel_types** | **List[int]** | | [optional] + +## Example + +```python +from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelSelectComponentForMessageRequest from a JSON string +channel_select_component_for_message_request_instance = ChannelSelectComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ChannelSelectComponentForMessageRequest.to_json()) + +# convert the object into a dict +channel_select_component_for_message_request_dict = channel_select_component_for_message_request_instance.to_dict() +# create an instance of ChannelSelectComponentForMessageRequest from a dict +channel_select_component_for_message_request_from_dict = ChannelSelectComponentForMessageRequest.from_dict(channel_select_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelSelectComponentResponse.md b/docs/ChannelSelectComponentResponse.md new file mode 100644 index 0000000..1b92887 --- /dev/null +++ b/docs/ChannelSelectComponentResponse.md @@ -0,0 +1,37 @@ +# ChannelSelectComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**channel_types** | **List[int]** | | [optional] +**default_values** | [**List[ChannelSelectDefaultValueResponse]**](ChannelSelectDefaultValueResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelSelectComponentResponse from a JSON string +channel_select_component_response_instance = ChannelSelectComponentResponse.from_json(json) +# print the JSON string representation of the object +print(ChannelSelectComponentResponse.to_json()) + +# convert the object into a dict +channel_select_component_response_dict = channel_select_component_response_instance.to_dict() +# create an instance of ChannelSelectComponentResponse from a dict +channel_select_component_response_from_dict = ChannelSelectComponentResponse.from_dict(channel_select_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelSelectDefaultValue.md b/docs/ChannelSelectDefaultValue.md new file mode 100644 index 0000000..f0b0d4e --- /dev/null +++ b/docs/ChannelSelectDefaultValue.md @@ -0,0 +1,30 @@ +# ChannelSelectDefaultValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelSelectDefaultValue from a JSON string +channel_select_default_value_instance = ChannelSelectDefaultValue.from_json(json) +# print the JSON string representation of the object +print(ChannelSelectDefaultValue.to_json()) + +# convert the object into a dict +channel_select_default_value_dict = channel_select_default_value_instance.to_dict() +# create an instance of ChannelSelectDefaultValue from a dict +channel_select_default_value_from_dict = ChannelSelectDefaultValue.from_dict(channel_select_default_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChannelSelectDefaultValueResponse.md b/docs/ChannelSelectDefaultValueResponse.md new file mode 100644 index 0000000..d60d1e2 --- /dev/null +++ b/docs/ChannelSelectDefaultValueResponse.md @@ -0,0 +1,30 @@ +# ChannelSelectDefaultValueResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelSelectDefaultValueResponse from a JSON string +channel_select_default_value_response_instance = ChannelSelectDefaultValueResponse.from_json(json) +# print the JSON string representation of the object +print(ChannelSelectDefaultValueResponse.to_json()) + +# convert the object into a dict +channel_select_default_value_response_dict = channel_select_default_value_response_instance.to_dict() +# create an instance of ChannelSelectDefaultValueResponse from a dict +channel_select_default_value_response_from_dict = ChannelSelectDefaultValueResponse.from_dict(channel_select_default_value_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CommandPermissionResponse.md b/docs/CommandPermissionResponse.md new file mode 100644 index 0000000..5b92368 --- /dev/null +++ b/docs/CommandPermissionResponse.md @@ -0,0 +1,31 @@ +# CommandPermissionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**permission** | **bool** | | + +## Example + +```python +from dc_rest.models.command_permission_response import CommandPermissionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CommandPermissionResponse from a JSON string +command_permission_response_instance = CommandPermissionResponse.from_json(json) +# print the JSON string representation of the object +print(CommandPermissionResponse.to_json()) + +# convert the object into a dict +command_permission_response_dict = command_permission_response_instance.to_dict() +# create an instance of CommandPermissionResponse from a dict +command_permission_response_from_dict = CommandPermissionResponse.from_dict(command_permission_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CommandPermissionsResponse.md b/docs/CommandPermissionsResponse.md new file mode 100644 index 0000000..0f33137 --- /dev/null +++ b/docs/CommandPermissionsResponse.md @@ -0,0 +1,32 @@ +# CommandPermissionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**application_id** | **str** | | +**guild_id** | **str** | | +**permissions** | [**List[CommandPermissionResponse]**](CommandPermissionResponse.md) | | + +## Example + +```python +from dc_rest.models.command_permissions_response import CommandPermissionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CommandPermissionsResponse from a JSON string +command_permissions_response_instance = CommandPermissionsResponse.from_json(json) +# print the JSON string representation of the object +print(CommandPermissionsResponse.to_json()) + +# convert the object into a dict +command_permissions_response_dict = command_permissions_response_instance.to_dict() +# create an instance of CommandPermissionsResponse from a dict +command_permissions_response_from_dict = CommandPermissionsResponse.from_dict(command_permissions_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComponentEmojiForMessageRequest.md b/docs/ComponentEmojiForMessageRequest.md new file mode 100644 index 0000000..f4b6874 --- /dev/null +++ b/docs/ComponentEmojiForMessageRequest.md @@ -0,0 +1,30 @@ +# ComponentEmojiForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ComponentEmojiForMessageRequest from a JSON string +component_emoji_for_message_request_instance = ComponentEmojiForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ComponentEmojiForMessageRequest.to_json()) + +# convert the object into a dict +component_emoji_for_message_request_dict = component_emoji_for_message_request_instance.to_dict() +# create an instance of ComponentEmojiForMessageRequest from a dict +component_emoji_for_message_request_from_dict = ComponentEmojiForMessageRequest.from_dict(component_emoji_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComponentEmojiResponse.md b/docs/ComponentEmojiResponse.md new file mode 100644 index 0000000..597e262 --- /dev/null +++ b/docs/ComponentEmojiResponse.md @@ -0,0 +1,31 @@ +# ComponentEmojiResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**animated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.component_emoji_response import ComponentEmojiResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ComponentEmojiResponse from a JSON string +component_emoji_response_instance = ComponentEmojiResponse.from_json(json) +# print the JSON string representation of the object +print(ComponentEmojiResponse.to_json()) + +# convert the object into a dict +component_emoji_response_dict = component_emoji_response_instance.to_dict() +# create an instance of ComponentEmojiResponse from a dict +component_emoji_response_from_dict = ComponentEmojiResponse.from_dict(component_emoji_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectedAccountGuildResponse.md b/docs/ConnectedAccountGuildResponse.md new file mode 100644 index 0000000..900e75a --- /dev/null +++ b/docs/ConnectedAccountGuildResponse.md @@ -0,0 +1,31 @@ +# ConnectedAccountGuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**icon** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectedAccountGuildResponse from a JSON string +connected_account_guild_response_instance = ConnectedAccountGuildResponse.from_json(json) +# print the JSON string representation of the object +print(ConnectedAccountGuildResponse.to_json()) + +# convert the object into a dict +connected_account_guild_response_dict = connected_account_guild_response_instance.to_dict() +# create an instance of ConnectedAccountGuildResponse from a dict +connected_account_guild_response_from_dict = ConnectedAccountGuildResponse.from_dict(connected_account_guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectedAccountIntegrationResponse.md b/docs/ConnectedAccountIntegrationResponse.md new file mode 100644 index 0000000..f827aa2 --- /dev/null +++ b/docs/ConnectedAccountIntegrationResponse.md @@ -0,0 +1,32 @@ +# ConnectedAccountIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**account** | [**AccountResponse**](AccountResponse.md) | | +**guild** | [**ConnectedAccountGuildResponse**](ConnectedAccountGuildResponse.md) | | + +## Example + +```python +from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectedAccountIntegrationResponse from a JSON string +connected_account_integration_response_instance = ConnectedAccountIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(ConnectedAccountIntegrationResponse.to_json()) + +# convert the object into a dict +connected_account_integration_response_dict = connected_account_integration_response_instance.to_dict() +# create an instance of ConnectedAccountIntegrationResponse from a dict +connected_account_integration_response_from_dict = ConnectedAccountIntegrationResponse.from_dict(connected_account_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectedAccountResponse.md b/docs/ConnectedAccountResponse.md new file mode 100644 index 0000000..31a4c7a --- /dev/null +++ b/docs/ConnectedAccountResponse.md @@ -0,0 +1,38 @@ +# ConnectedAccountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | [optional] +**type** | **str** | | +**friend_sync** | **bool** | | +**integrations** | [**List[ConnectedAccountIntegrationResponse]**](ConnectedAccountIntegrationResponse.md) | | [optional] +**show_activity** | **bool** | | +**two_way_link** | **bool** | | +**verified** | **bool** | | +**visibility** | **int** | | +**revoked** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.connected_account_response import ConnectedAccountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectedAccountResponse from a JSON string +connected_account_response_instance = ConnectedAccountResponse.from_json(json) +# print the JSON string representation of the object +print(ConnectedAccountResponse.to_json()) + +# convert the object into a dict +connected_account_response_dict = connected_account_response_instance.to_dict() +# create an instance of ConnectedAccountResponse from a dict +connected_account_response_from_dict = ConnectedAccountResponse.from_dict(connected_account_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContainerComponentForMessageRequest.md b/docs/ContainerComponentForMessageRequest.md new file mode 100644 index 0000000..4ac7878 --- /dev/null +++ b/docs/ContainerComponentForMessageRequest.md @@ -0,0 +1,32 @@ +# ContainerComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**accent_color** | **int** | | [optional] +**components** | [**List[ContainerComponentForMessageRequestComponentsInner]**](ContainerComponentForMessageRequestComponentsInner.md) | | +**spoiler** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ContainerComponentForMessageRequest from a JSON string +container_component_for_message_request_instance = ContainerComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ContainerComponentForMessageRequest.to_json()) + +# convert the object into a dict +container_component_for_message_request_dict = container_component_for_message_request_instance.to_dict() +# create an instance of ContainerComponentForMessageRequest from a dict +container_component_for_message_request_from_dict = ContainerComponentForMessageRequest.from_dict(container_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContainerComponentForMessageRequestComponentsInner.md b/docs/ContainerComponentForMessageRequestComponentsInner.md new file mode 100644 index 0000000..41c456d --- /dev/null +++ b/docs/ContainerComponentForMessageRequestComponentsInner.md @@ -0,0 +1,37 @@ +# ContainerComponentForMessageRequestComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**components** | [**List[TextDisplayComponentForMessageRequest]**](TextDisplayComponentForMessageRequest.md) | | +**spoiler** | **bool** | | [optional] +**file** | [**UnfurledMediaRequestWithAttachmentReferenceRequired**](UnfurledMediaRequestWithAttachmentReferenceRequired.md) | | +**items** | [**List[MediaGalleryItemRequest]**](MediaGalleryItemRequest.md) | | +**accessory** | [**SectionComponentForMessageRequestAccessory**](SectionComponentForMessageRequestAccessory.md) | | +**spacing** | **int** | | [optional] +**divider** | **bool** | | [optional] +**content** | **str** | | + +## Example + +```python +from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ContainerComponentForMessageRequestComponentsInner from a JSON string +container_component_for_message_request_components_inner_instance = ContainerComponentForMessageRequestComponentsInner.from_json(json) +# print the JSON string representation of the object +print(ContainerComponentForMessageRequestComponentsInner.to_json()) + +# convert the object into a dict +container_component_for_message_request_components_inner_dict = container_component_for_message_request_components_inner_instance.to_dict() +# create an instance of ContainerComponentForMessageRequestComponentsInner from a dict +container_component_for_message_request_components_inner_from_dict = ContainerComponentForMessageRequestComponentsInner.from_dict(container_component_for_message_request_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContainerComponentResponse.md b/docs/ContainerComponentResponse.md new file mode 100644 index 0000000..e083b6d --- /dev/null +++ b/docs/ContainerComponentResponse.md @@ -0,0 +1,33 @@ +# ContainerComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**accent_color** | **int** | | [optional] +**components** | [**List[ContainerComponentResponseComponentsInner]**](ContainerComponentResponseComponentsInner.md) | | +**spoiler** | **bool** | | + +## Example + +```python +from dc_rest.models.container_component_response import ContainerComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ContainerComponentResponse from a JSON string +container_component_response_instance = ContainerComponentResponse.from_json(json) +# print the JSON string representation of the object +print(ContainerComponentResponse.to_json()) + +# convert the object into a dict +container_component_response_dict = container_component_response_instance.to_dict() +# create an instance of ContainerComponentResponse from a dict +container_component_response_from_dict = ContainerComponentResponse.from_dict(container_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContainerComponentResponseComponentsInner.md b/docs/ContainerComponentResponseComponentsInner.md new file mode 100644 index 0000000..a02873f --- /dev/null +++ b/docs/ContainerComponentResponseComponentsInner.md @@ -0,0 +1,40 @@ +# ContainerComponentResponseComponentsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**components** | [**List[TextDisplayComponentResponse]**](TextDisplayComponentResponse.md) | | +**file** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**name** | **str** | | [optional] +**size** | **int** | | [optional] +**spoiler** | **bool** | | +**items** | [**List[MediaGalleryItemResponse]**](MediaGalleryItemResponse.md) | | +**accessory** | [**SectionComponentResponseAccessory**](SectionComponentResponseAccessory.md) | | +**spacing** | **int** | | +**divider** | **bool** | | +**content** | **str** | | + +## Example + +```python +from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ContainerComponentResponseComponentsInner from a JSON string +container_component_response_components_inner_instance = ContainerComponentResponseComponentsInner.from_json(json) +# print the JSON string representation of the object +print(ContainerComponentResponseComponentsInner.to_json()) + +# convert the object into a dict +container_component_response_components_inner_dict = container_component_response_components_inner_instance.to_dict() +# create an instance of ContainerComponentResponseComponentsInner from a dict +container_component_response_components_inner_from_dict = ContainerComponentResponseComponentsInner.from_dict(container_component_response_components_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateApplicationEmojiRequest.md b/docs/CreateApplicationEmojiRequest.md new file mode 100644 index 0000000..20bb7d9 --- /dev/null +++ b/docs/CreateApplicationEmojiRequest.md @@ -0,0 +1,30 @@ +# CreateApplicationEmojiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**image** | **str** | | + +## Example + +```python +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateApplicationEmojiRequest from a JSON string +create_application_emoji_request_instance = CreateApplicationEmojiRequest.from_json(json) +# print the JSON string representation of the object +print(CreateApplicationEmojiRequest.to_json()) + +# convert the object into a dict +create_application_emoji_request_dict = create_application_emoji_request_instance.to_dict() +# create an instance of CreateApplicationEmojiRequest from a dict +create_application_emoji_request_from_dict = CreateApplicationEmojiRequest.from_dict(create_application_emoji_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAutoModerationRule200Response.md b/docs/CreateAutoModerationRule200Response.md new file mode 100644 index 0000000..a857147 --- /dev/null +++ b/docs/CreateAutoModerationRule200Response.md @@ -0,0 +1,39 @@ +# CreateAutoModerationRule200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateAutoModerationRule200Response from a JSON string +create_auto_moderation_rule200_response_instance = CreateAutoModerationRule200Response.from_json(json) +# print the JSON string representation of the object +print(CreateAutoModerationRule200Response.to_json()) + +# convert the object into a dict +create_auto_moderation_rule200_response_dict = create_auto_moderation_rule200_response_instance.to_dict() +# create an instance of CreateAutoModerationRule200Response from a dict +create_auto_moderation_rule200_response_from_dict = CreateAutoModerationRule200Response.from_dict(create_auto_moderation_rule200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAutoModerationRuleRequest.md b/docs/CreateAutoModerationRuleRequest.md new file mode 100644 index 0000000..d0c2a70 --- /dev/null +++ b/docs/CreateAutoModerationRuleRequest.md @@ -0,0 +1,36 @@ +# CreateAutoModerationRuleRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | +**trigger_metadata** | [**MentionSpamTriggerMetadata**](MentionSpamTriggerMetadata.md) | | + +## Example + +```python +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateAutoModerationRuleRequest from a JSON string +create_auto_moderation_rule_request_instance = CreateAutoModerationRuleRequest.from_json(json) +# print the JSON string representation of the object +print(CreateAutoModerationRuleRequest.to_json()) + +# convert the object into a dict +create_auto_moderation_rule_request_dict = create_auto_moderation_rule_request_instance.to_dict() +# create an instance of CreateAutoModerationRuleRequest from a dict +create_auto_moderation_rule_request_from_dict = CreateAutoModerationRuleRequest.from_dict(create_auto_moderation_rule_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateChannelInviteRequest.md b/docs/CreateChannelInviteRequest.md new file mode 100644 index 0000000..781d089 --- /dev/null +++ b/docs/CreateChannelInviteRequest.md @@ -0,0 +1,35 @@ +# CreateChannelInviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_age** | **int** | | [optional] +**temporary** | **bool** | | [optional] +**max_uses** | **int** | | [optional] +**unique** | **bool** | | [optional] +**target_user_id** | **str** | | [optional] +**target_application_id** | **str** | | [optional] +**target_type** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateChannelInviteRequest from a JSON string +create_channel_invite_request_instance = CreateChannelInviteRequest.from_json(json) +# print the JSON string representation of the object +print(CreateChannelInviteRequest.to_json()) + +# convert the object into a dict +create_channel_invite_request_dict = create_channel_invite_request_instance.to_dict() +# create an instance of CreateChannelInviteRequest from a dict +create_channel_invite_request_from_dict = CreateChannelInviteRequest.from_dict(create_channel_invite_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateEntitlementRequestData.md b/docs/CreateEntitlementRequestData.md new file mode 100644 index 0000000..b577b3d --- /dev/null +++ b/docs/CreateEntitlementRequestData.md @@ -0,0 +1,31 @@ +# CreateEntitlementRequestData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sku_id** | **str** | | +**owner_id** | **str** | | +**owner_type** | **int** | | + +## Example + +```python +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEntitlementRequestData from a JSON string +create_entitlement_request_data_instance = CreateEntitlementRequestData.from_json(json) +# print the JSON string representation of the object +print(CreateEntitlementRequestData.to_json()) + +# convert the object into a dict +create_entitlement_request_data_dict = create_entitlement_request_data_instance.to_dict() +# create an instance of CreateEntitlementRequestData from a dict +create_entitlement_request_data_from_dict = CreateEntitlementRequestData.from_dict(create_entitlement_request_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateForumThreadRequest.md b/docs/CreateForumThreadRequest.md new file mode 100644 index 0000000..504e0fc --- /dev/null +++ b/docs/CreateForumThreadRequest.md @@ -0,0 +1,33 @@ +# CreateForumThreadRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**auto_archive_duration** | **int** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**applied_tags** | **List[str]** | | [optional] +**message** | [**BaseCreateMessageCreateRequest**](BaseCreateMessageCreateRequest.md) | | + +## Example + +```python +from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateForumThreadRequest from a JSON string +create_forum_thread_request_instance = CreateForumThreadRequest.from_json(json) +# print the JSON string representation of the object +print(CreateForumThreadRequest.to_json()) + +# convert the object into a dict +create_forum_thread_request_dict = create_forum_thread_request_instance.to_dict() +# create an instance of CreateForumThreadRequest from a dict +create_forum_thread_request_from_dict = CreateForumThreadRequest.from_dict(create_forum_thread_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupDMInviteRequest.md b/docs/CreateGroupDMInviteRequest.md new file mode 100644 index 0000000..369d2cc --- /dev/null +++ b/docs/CreateGroupDMInviteRequest.md @@ -0,0 +1,29 @@ +# CreateGroupDMInviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_age** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGroupDMInviteRequest from a JSON string +create_group_dm_invite_request_instance = CreateGroupDMInviteRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGroupDMInviteRequest.to_json()) + +# convert the object into a dict +create_group_dm_invite_request_dict = create_group_dm_invite_request_instance.to_dict() +# create an instance of CreateGroupDMInviteRequest from a dict +create_group_dm_invite_request_from_dict = CreateGroupDMInviteRequest.from_dict(create_group_dm_invite_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildChannelRequest.md b/docs/CreateGuildChannelRequest.md new file mode 100644 index 0000000..975869c --- /dev/null +++ b/docs/CreateGuildChannelRequest.md @@ -0,0 +1,47 @@ +# CreateGuildChannelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**name** | **str** | | +**position** | **int** | | [optional] +**topic** | **str** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**nsfw** | **bool** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**parent_id** | **str** | | [optional] +**permission_overwrites** | [**List[ChannelPermissionOverwriteRequest]**](ChannelPermissionOverwriteRequest.md) | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_reaction_emoji** | [**UpdateDefaultReactionEmojiRequest**](UpdateDefaultReactionEmojiRequest.md) | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**available_tags** | [**List[Optional[CreateOrUpdateThreadTagRequest]]**](CreateOrUpdateThreadTagRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildChannelRequest from a JSON string +create_guild_channel_request_instance = CreateGuildChannelRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildChannelRequest.to_json()) + +# convert the object into a dict +create_guild_channel_request_dict = create_guild_channel_request_instance.to_dict() +# create an instance of CreateGuildChannelRequest from a dict +create_guild_channel_request_from_dict = CreateGuildChannelRequest.from_dict(create_guild_channel_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildEmojiRequest.md b/docs/CreateGuildEmojiRequest.md new file mode 100644 index 0000000..206feab --- /dev/null +++ b/docs/CreateGuildEmojiRequest.md @@ -0,0 +1,31 @@ +# CreateGuildEmojiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**image** | **str** | | +**roles** | **List[Optional[str]]** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildEmojiRequest from a JSON string +create_guild_emoji_request_instance = CreateGuildEmojiRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildEmojiRequest.to_json()) + +# convert the object into a dict +create_guild_emoji_request_dict = create_guild_emoji_request_instance.to_dict() +# create an instance of CreateGuildEmojiRequest from a dict +create_guild_emoji_request_from_dict = CreateGuildEmojiRequest.from_dict(create_guild_emoji_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildFromTemplateRequest.md b/docs/CreateGuildFromTemplateRequest.md new file mode 100644 index 0000000..cbb528f --- /dev/null +++ b/docs/CreateGuildFromTemplateRequest.md @@ -0,0 +1,30 @@ +# CreateGuildFromTemplateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**icon** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildFromTemplateRequest from a JSON string +create_guild_from_template_request_instance = CreateGuildFromTemplateRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildFromTemplateRequest.to_json()) + +# convert the object into a dict +create_guild_from_template_request_dict = create_guild_from_template_request_instance.to_dict() +# create an instance of CreateGuildFromTemplateRequest from a dict +create_guild_from_template_request_from_dict = CreateGuildFromTemplateRequest.from_dict(create_guild_from_template_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildInviteRequest.md b/docs/CreateGuildInviteRequest.md new file mode 100644 index 0000000..e91e5cd --- /dev/null +++ b/docs/CreateGuildInviteRequest.md @@ -0,0 +1,35 @@ +# CreateGuildInviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_age** | **int** | | [optional] +**temporary** | **bool** | | [optional] +**max_uses** | **int** | | [optional] +**unique** | **bool** | | [optional] +**target_user_id** | **str** | | [optional] +**target_application_id** | **str** | | [optional] +**target_type** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildInviteRequest from a JSON string +create_guild_invite_request_instance = CreateGuildInviteRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildInviteRequest.to_json()) + +# convert the object into a dict +create_guild_invite_request_dict = create_guild_invite_request_instance.to_dict() +# create an instance of CreateGuildInviteRequest from a dict +create_guild_invite_request_from_dict = CreateGuildInviteRequest.from_dict(create_guild_invite_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildRequestChannelItem.md b/docs/CreateGuildRequestChannelItem.md new file mode 100644 index 0000000..5e1871a --- /dev/null +++ b/docs/CreateGuildRequestChannelItem.md @@ -0,0 +1,48 @@ +# CreateGuildRequestChannelItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**name** | **str** | | +**position** | **int** | | [optional] +**topic** | **str** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**nsfw** | **bool** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**parent_id** | **str** | | [optional] +**permission_overwrites** | [**List[ChannelPermissionOverwriteRequest]**](ChannelPermissionOverwriteRequest.md) | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_reaction_emoji** | [**UpdateDefaultReactionEmojiRequest**](UpdateDefaultReactionEmojiRequest.md) | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**id** | **str** | | [optional] +**available_tags** | [**List[CreateOrUpdateThreadTagRequest]**](CreateOrUpdateThreadTagRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildRequestChannelItem from a JSON string +create_guild_request_channel_item_instance = CreateGuildRequestChannelItem.from_json(json) +# print the JSON string representation of the object +print(CreateGuildRequestChannelItem.to_json()) + +# convert the object into a dict +create_guild_request_channel_item_dict = create_guild_request_channel_item_instance.to_dict() +# create an instance of CreateGuildRequestChannelItem from a dict +create_guild_request_channel_item_from_dict = CreateGuildRequestChannelItem.from_dict(create_guild_request_channel_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildRequestRoleItem.md b/docs/CreateGuildRequestRoleItem.md new file mode 100644 index 0000000..01ad56c --- /dev/null +++ b/docs/CreateGuildRequestRoleItem.md @@ -0,0 +1,35 @@ +# CreateGuildRequestRoleItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | [optional] +**permissions** | **int** | | [optional] +**color** | **int** | | [optional] +**hoist** | **bool** | | [optional] +**mentionable** | **bool** | | [optional] +**unicode_emoji** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildRequestRoleItem from a JSON string +create_guild_request_role_item_instance = CreateGuildRequestRoleItem.from_json(json) +# print the JSON string representation of the object +print(CreateGuildRequestRoleItem.to_json()) + +# convert the object into a dict +create_guild_request_role_item_dict = create_guild_request_role_item_instance.to_dict() +# create an instance of CreateGuildRequestRoleItem from a dict +create_guild_request_role_item_from_dict = CreateGuildRequestRoleItem.from_dict(create_guild_request_role_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildRoleRequest.md b/docs/CreateGuildRoleRequest.md new file mode 100644 index 0000000..7c8c3e7 --- /dev/null +++ b/docs/CreateGuildRoleRequest.md @@ -0,0 +1,35 @@ +# CreateGuildRoleRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**permissions** | **int** | | [optional] +**color** | **int** | | [optional] +**hoist** | **bool** | | [optional] +**mentionable** | **bool** | | [optional] +**icon** | **str** | | [optional] +**unicode_emoji** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildRoleRequest from a JSON string +create_guild_role_request_instance = CreateGuildRoleRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildRoleRequest.to_json()) + +# convert the object into a dict +create_guild_role_request_dict = create_guild_role_request_instance.to_dict() +# create an instance of CreateGuildRoleRequest from a dict +create_guild_role_request_from_dict = CreateGuildRoleRequest.from_dict(create_guild_role_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildScheduledEventRequest.md b/docs/CreateGuildScheduledEventRequest.md new file mode 100644 index 0000000..3e64d64 --- /dev/null +++ b/docs/CreateGuildScheduledEventRequest.md @@ -0,0 +1,37 @@ +# CreateGuildScheduledEventRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**privacy_level** | **object** | | +**entity_type** | **int** | | +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildScheduledEventRequest from a JSON string +create_guild_scheduled_event_request_instance = CreateGuildScheduledEventRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildScheduledEventRequest.to_json()) + +# convert the object into a dict +create_guild_scheduled_event_request_dict = create_guild_scheduled_event_request_instance.to_dict() +# create an instance of CreateGuildScheduledEventRequest from a dict +create_guild_scheduled_event_request_from_dict = CreateGuildScheduledEventRequest.from_dict(create_guild_scheduled_event_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGuildTemplateRequest.md b/docs/CreateGuildTemplateRequest.md new file mode 100644 index 0000000..fac278a --- /dev/null +++ b/docs/CreateGuildTemplateRequest.md @@ -0,0 +1,30 @@ +# CreateGuildTemplateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateGuildTemplateRequest from a JSON string +create_guild_template_request_instance = CreateGuildTemplateRequest.from_json(json) +# print the JSON string representation of the object +print(CreateGuildTemplateRequest.to_json()) + +# convert the object into a dict +create_guild_template_request_dict = create_guild_template_request_instance.to_dict() +# create an instance of CreateGuildTemplateRequest from a dict +create_guild_template_request_from_dict = CreateGuildTemplateRequest.from_dict(create_guild_template_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInteractionResponseRequest.md b/docs/CreateInteractionResponseRequest.md new file mode 100644 index 0000000..da4e70e --- /dev/null +++ b/docs/CreateInteractionResponseRequest.md @@ -0,0 +1,30 @@ +# CreateInteractionResponseRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**data** | [**IncomingWebhookUpdateForInteractionCallbackRequestPartial**](IncomingWebhookUpdateForInteractionCallbackRequestPartial.md) | | + +## Example + +```python +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInteractionResponseRequest from a JSON string +create_interaction_response_request_instance = CreateInteractionResponseRequest.from_json(json) +# print the JSON string representation of the object +print(CreateInteractionResponseRequest.to_json()) + +# convert the object into a dict +create_interaction_response_request_dict = create_interaction_response_request_instance.to_dict() +# create an instance of CreateInteractionResponseRequest from a dict +create_interaction_response_request_from_dict = CreateInteractionResponseRequest.from_dict(create_interaction_response_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateLobbyRequest.md b/docs/CreateLobbyRequest.md new file mode 100644 index 0000000..224d973 --- /dev/null +++ b/docs/CreateLobbyRequest.md @@ -0,0 +1,31 @@ +# CreateLobbyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idle_timeout_seconds** | **int** | | [optional] +**members** | [**List[LobbyMemberRequest]**](LobbyMemberRequest.md) | | [optional] +**metadata** | **Dict[str, str]** | | [optional] + +## Example + +```python +from dc_rest.models.create_lobby_request import CreateLobbyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateLobbyRequest from a JSON string +create_lobby_request_instance = CreateLobbyRequest.from_json(json) +# print the JSON string representation of the object +print(CreateLobbyRequest.to_json()) + +# convert the object into a dict +create_lobby_request_dict = create_lobby_request_instance.to_dict() +# create an instance of CreateLobbyRequest from a dict +create_lobby_request_from_dict = CreateLobbyRequest.from_dict(create_lobby_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMessageInteractionCallbackRequest.md b/docs/CreateMessageInteractionCallbackRequest.md new file mode 100644 index 0000000..82450de --- /dev/null +++ b/docs/CreateMessageInteractionCallbackRequest.md @@ -0,0 +1,30 @@ +# CreateMessageInteractionCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**data** | [**IncomingWebhookInteractionRequest**](IncomingWebhookInteractionRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateMessageInteractionCallbackRequest from a JSON string +create_message_interaction_callback_request_instance = CreateMessageInteractionCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(CreateMessageInteractionCallbackRequest.to_json()) + +# convert the object into a dict +create_message_interaction_callback_request_dict = create_message_interaction_callback_request_instance.to_dict() +# create an instance of CreateMessageInteractionCallbackRequest from a dict +create_message_interaction_callback_request_from_dict = CreateMessageInteractionCallbackRequest.from_dict(create_message_interaction_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateMessageInteractionCallbackResponse.md b/docs/CreateMessageInteractionCallbackResponse.md new file mode 100644 index 0000000..95d9643 --- /dev/null +++ b/docs/CreateMessageInteractionCallbackResponse.md @@ -0,0 +1,30 @@ +# CreateMessageInteractionCallbackResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**message** | [**MessageResponse**](MessageResponse.md) | | + +## Example + +```python +from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateMessageInteractionCallbackResponse from a JSON string +create_message_interaction_callback_response_instance = CreateMessageInteractionCallbackResponse.from_json(json) +# print the JSON string representation of the object +print(CreateMessageInteractionCallbackResponse.to_json()) + +# convert the object into a dict +create_message_interaction_callback_response_dict = create_message_interaction_callback_response_instance.to_dict() +# create an instance of CreateMessageInteractionCallbackResponse from a dict +create_message_interaction_callback_response_from_dict = CreateMessageInteractionCallbackResponse.from_dict(create_message_interaction_callback_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOrJoinLobbyRequest.md b/docs/CreateOrJoinLobbyRequest.md new file mode 100644 index 0000000..720932f --- /dev/null +++ b/docs/CreateOrJoinLobbyRequest.md @@ -0,0 +1,32 @@ +# CreateOrJoinLobbyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idle_timeout_seconds** | **int** | | [optional] +**lobby_metadata** | **Dict[str, str]** | | [optional] +**member_metadata** | **Dict[str, str]** | | [optional] +**secret** | **str** | | + +## Example + +```python +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrJoinLobbyRequest from a JSON string +create_or_join_lobby_request_instance = CreateOrJoinLobbyRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrJoinLobbyRequest.to_json()) + +# convert the object into a dict +create_or_join_lobby_request_dict = create_or_join_lobby_request_instance.to_dict() +# create an instance of CreateOrJoinLobbyRequest from a dict +create_or_join_lobby_request_from_dict = CreateOrJoinLobbyRequest.from_dict(create_or_join_lobby_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOrUpdateThreadTagRequest.md b/docs/CreateOrUpdateThreadTagRequest.md new file mode 100644 index 0000000..4df4871 --- /dev/null +++ b/docs/CreateOrUpdateThreadTagRequest.md @@ -0,0 +1,32 @@ +# CreateOrUpdateThreadTagRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**moderated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrUpdateThreadTagRequest from a JSON string +create_or_update_thread_tag_request_instance = CreateOrUpdateThreadTagRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrUpdateThreadTagRequest.to_json()) + +# convert the object into a dict +create_or_update_thread_tag_request_dict = create_or_update_thread_tag_request_instance.to_dict() +# create an instance of CreateOrUpdateThreadTagRequest from a dict +create_or_update_thread_tag_request_from_dict = CreateOrUpdateThreadTagRequest.from_dict(create_or_update_thread_tag_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePrivateChannelRequest.md b/docs/CreatePrivateChannelRequest.md new file mode 100644 index 0000000..a447ad2 --- /dev/null +++ b/docs/CreatePrivateChannelRequest.md @@ -0,0 +1,31 @@ +# CreatePrivateChannelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient_id** | **str** | | [optional] +**access_tokens** | **List[str]** | | [optional] +**nicks** | **Dict[str, Optional[str]]** | | [optional] + +## Example + +```python +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePrivateChannelRequest from a JSON string +create_private_channel_request_instance = CreatePrivateChannelRequest.from_json(json) +# print the JSON string representation of the object +print(CreatePrivateChannelRequest.to_json()) + +# convert the object into a dict +create_private_channel_request_dict = create_private_channel_request_instance.to_dict() +# create an instance of CreatePrivateChannelRequest from a dict +create_private_channel_request_from_dict = CreatePrivateChannelRequest.from_dict(create_private_channel_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateStageInstanceRequest.md b/docs/CreateStageInstanceRequest.md new file mode 100644 index 0000000..6c67466 --- /dev/null +++ b/docs/CreateStageInstanceRequest.md @@ -0,0 +1,33 @@ +# CreateStageInstanceRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic** | **str** | | +**channel_id** | **str** | | +**privacy_level** | **int** | | [optional] +**guild_scheduled_event_id** | **str** | | [optional] +**send_start_notification** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateStageInstanceRequest from a JSON string +create_stage_instance_request_instance = CreateStageInstanceRequest.from_json(json) +# print the JSON string representation of the object +print(CreateStageInstanceRequest.to_json()) + +# convert the object into a dict +create_stage_instance_request_dict = create_stage_instance_request_instance.to_dict() +# create an instance of CreateStageInstanceRequest from a dict +create_stage_instance_request_from_dict = CreateStageInstanceRequest.from_dict(create_stage_instance_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTextThreadWithMessageRequest.md b/docs/CreateTextThreadWithMessageRequest.md new file mode 100644 index 0000000..9b8c3ba --- /dev/null +++ b/docs/CreateTextThreadWithMessageRequest.md @@ -0,0 +1,31 @@ +# CreateTextThreadWithMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**auto_archive_duration** | **int** | | [optional] +**rate_limit_per_user** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTextThreadWithMessageRequest from a JSON string +create_text_thread_with_message_request_instance = CreateTextThreadWithMessageRequest.from_json(json) +# print the JSON string representation of the object +print(CreateTextThreadWithMessageRequest.to_json()) + +# convert the object into a dict +create_text_thread_with_message_request_dict = create_text_thread_with_message_request_instance.to_dict() +# create an instance of CreateTextThreadWithMessageRequest from a dict +create_text_thread_with_message_request_from_dict = CreateTextThreadWithMessageRequest.from_dict(create_text_thread_with_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTextThreadWithoutMessageRequest.md b/docs/CreateTextThreadWithoutMessageRequest.md new file mode 100644 index 0000000..944f3ec --- /dev/null +++ b/docs/CreateTextThreadWithoutMessageRequest.md @@ -0,0 +1,33 @@ +# CreateTextThreadWithoutMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**auto_archive_duration** | **int** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**type** | **int** | | [optional] +**invitable** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTextThreadWithoutMessageRequest from a JSON string +create_text_thread_without_message_request_instance = CreateTextThreadWithoutMessageRequest.from_json(json) +# print the JSON string representation of the object +print(CreateTextThreadWithoutMessageRequest.to_json()) + +# convert the object into a dict +create_text_thread_without_message_request_dict = create_text_thread_without_message_request_instance.to_dict() +# create an instance of CreateTextThreadWithoutMessageRequest from a dict +create_text_thread_without_message_request_from_dict = CreateTextThreadWithoutMessageRequest.from_dict(create_text_thread_without_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateThreadRequest.md b/docs/CreateThreadRequest.md new file mode 100644 index 0000000..999dcf7 --- /dev/null +++ b/docs/CreateThreadRequest.md @@ -0,0 +1,35 @@ +# CreateThreadRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**auto_archive_duration** | **int** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**applied_tags** | **List[str]** | | [optional] +**message** | [**BaseCreateMessageCreateRequest**](BaseCreateMessageCreateRequest.md) | | +**type** | **int** | | [optional] +**invitable** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.create_thread_request import CreateThreadRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateThreadRequest from a JSON string +create_thread_request_instance = CreateThreadRequest.from_json(json) +# print the JSON string representation of the object +print(CreateThreadRequest.to_json()) + +# convert the object into a dict +create_thread_request_dict = create_thread_request_instance.to_dict() +# create an instance of CreateThreadRequest from a dict +create_thread_request_from_dict = CreateThreadRequest.from_dict(create_thread_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md new file mode 100644 index 0000000..948bbce --- /dev/null +++ b/docs/CreateWebhookRequest.md @@ -0,0 +1,30 @@ +# CreateWebhookRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**avatar** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.create_webhook_request import CreateWebhookRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateWebhookRequest from a JSON string +create_webhook_request_instance = CreateWebhookRequest.from_json(json) +# print the JSON string representation of the object +print(CreateWebhookRequest.to_json()) + +# convert the object into a dict +create_webhook_request_dict = create_webhook_request_instance.to_dict() +# create an instance of CreateWebhookRequest from a dict +create_webhook_request_from_dict = CreateWebhookRequest.from_dict(create_webhook_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatedThreadResponse.md b/docs/CreatedThreadResponse.md new file mode 100644 index 0000000..059d5ad --- /dev/null +++ b/docs/CreatedThreadResponse.md @@ -0,0 +1,49 @@ +# CreatedThreadResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**guild_id** | **str** | | +**name** | **str** | | +**parent_id** | **str** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**permissions** | **str** | | [optional] +**owner_id** | **str** | | +**thread_metadata** | [**ThreadMetadataResponse**](ThreadMetadataResponse.md) | | [optional] +**message_count** | **int** | | +**member_count** | **int** | | +**total_message_sent** | **int** | | +**applied_tags** | **List[str]** | | [optional] +**member** | [**ThreadMemberResponse**](ThreadMemberResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.created_thread_response import CreatedThreadResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatedThreadResponse from a JSON string +created_thread_response_instance = CreatedThreadResponse.from_json(json) +# print the JSON string representation of the object +print(CreatedThreadResponse.to_json()) + +# convert the object into a dict +created_thread_response_dict = created_thread_response_instance.to_dict() +# create an instance of CreatedThreadResponse from a dict +created_thread_response_from_dict = CreatedThreadResponse.from_dict(created_thread_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..d1603f9 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,17593 @@ +# dc_rest.DefaultApi + +All URIs are relative to *https://discord.com/api/v10* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_group_dm_user**](DefaultApi.md#add_group_dm_user) | **PUT** /channels/{channel_id}/recipients/{user_id} | +[**add_guild_member**](DefaultApi.md#add_guild_member) | **PUT** /guilds/{guild_id}/members/{user_id} | +[**add_guild_member_role**](DefaultApi.md#add_guild_member_role) | **PUT** /guilds/{guild_id}/members/{user_id}/roles/{role_id} | +[**add_lobby_member**](DefaultApi.md#add_lobby_member) | **PUT** /lobbies/{lobby_id}/members/{user_id} | +[**add_my_message_reaction**](DefaultApi.md#add_my_message_reaction) | **PUT** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me | +[**add_thread_member**](DefaultApi.md#add_thread_member) | **PUT** /channels/{channel_id}/thread-members/{user_id} | +[**applications_get_activity_instance**](DefaultApi.md#applications_get_activity_instance) | **GET** /applications/{application_id}/activity-instances/{instance_id} | +[**ban_user_from_guild**](DefaultApi.md#ban_user_from_guild) | **PUT** /guilds/{guild_id}/bans/{user_id} | +[**bulk_ban_users_from_guild**](DefaultApi.md#bulk_ban_users_from_guild) | **POST** /guilds/{guild_id}/bulk-ban | +[**bulk_delete_messages**](DefaultApi.md#bulk_delete_messages) | **POST** /channels/{channel_id}/messages/bulk-delete | +[**bulk_set_application_commands**](DefaultApi.md#bulk_set_application_commands) | **PUT** /applications/{application_id}/commands | +[**bulk_set_guild_application_commands**](DefaultApi.md#bulk_set_guild_application_commands) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands | +[**bulk_update_guild_channels**](DefaultApi.md#bulk_update_guild_channels) | **PATCH** /guilds/{guild_id}/channels | +[**bulk_update_guild_roles**](DefaultApi.md#bulk_update_guild_roles) | **PATCH** /guilds/{guild_id}/roles | +[**bulk_update_lobby_members**](DefaultApi.md#bulk_update_lobby_members) | **POST** /lobbies/{lobby_id}/members/bulk | +[**consume_entitlement**](DefaultApi.md#consume_entitlement) | **POST** /applications/{application_id}/entitlements/{entitlement_id}/consume | +[**create_application_command**](DefaultApi.md#create_application_command) | **POST** /applications/{application_id}/commands | +[**create_application_emoji**](DefaultApi.md#create_application_emoji) | **POST** /applications/{application_id}/emojis | +[**create_auto_moderation_rule**](DefaultApi.md#create_auto_moderation_rule) | **POST** /guilds/{guild_id}/auto-moderation/rules | +[**create_channel_invite**](DefaultApi.md#create_channel_invite) | **POST** /channels/{channel_id}/invites | +[**create_dm**](DefaultApi.md#create_dm) | **POST** /users/@me/channels | +[**create_entitlement**](DefaultApi.md#create_entitlement) | **POST** /applications/{application_id}/entitlements | +[**create_guild**](DefaultApi.md#create_guild) | **POST** /guilds | +[**create_guild_application_command**](DefaultApi.md#create_guild_application_command) | **POST** /applications/{application_id}/guilds/{guild_id}/commands | +[**create_guild_channel**](DefaultApi.md#create_guild_channel) | **POST** /guilds/{guild_id}/channels | +[**create_guild_emoji**](DefaultApi.md#create_guild_emoji) | **POST** /guilds/{guild_id}/emojis | +[**create_guild_from_template**](DefaultApi.md#create_guild_from_template) | **POST** /guilds/templates/{code} | +[**create_guild_role**](DefaultApi.md#create_guild_role) | **POST** /guilds/{guild_id}/roles | +[**create_guild_scheduled_event**](DefaultApi.md#create_guild_scheduled_event) | **POST** /guilds/{guild_id}/scheduled-events | +[**create_guild_soundboard_sound**](DefaultApi.md#create_guild_soundboard_sound) | **POST** /guilds/{guild_id}/soundboard-sounds | +[**create_guild_sticker**](DefaultApi.md#create_guild_sticker) | **POST** /guilds/{guild_id}/stickers | +[**create_guild_template**](DefaultApi.md#create_guild_template) | **POST** /guilds/{guild_id}/templates | +[**create_interaction_response**](DefaultApi.md#create_interaction_response) | **POST** /interactions/{interaction_id}/{interaction_token}/callback | +[**create_lobby**](DefaultApi.md#create_lobby) | **POST** /lobbies | +[**create_lobby_message**](DefaultApi.md#create_lobby_message) | **POST** /lobbies/{lobby_id}/messages | +[**create_message**](DefaultApi.md#create_message) | **POST** /channels/{channel_id}/messages | +[**create_or_join_lobby**](DefaultApi.md#create_or_join_lobby) | **PUT** /lobbies | +[**create_pin**](DefaultApi.md#create_pin) | **PUT** /channels/{channel_id}/messages/pins/{message_id} | +[**create_stage_instance**](DefaultApi.md#create_stage_instance) | **POST** /stage-instances | +[**create_thread**](DefaultApi.md#create_thread) | **POST** /channels/{channel_id}/threads | +[**create_thread_from_message**](DefaultApi.md#create_thread_from_message) | **POST** /channels/{channel_id}/messages/{message_id}/threads | +[**create_webhook**](DefaultApi.md#create_webhook) | **POST** /channels/{channel_id}/webhooks | +[**crosspost_message**](DefaultApi.md#crosspost_message) | **POST** /channels/{channel_id}/messages/{message_id}/crosspost | +[**delete_all_message_reactions**](DefaultApi.md#delete_all_message_reactions) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions | +[**delete_all_message_reactions_by_emoji**](DefaultApi.md#delete_all_message_reactions_by_emoji) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} | +[**delete_application_command**](DefaultApi.md#delete_application_command) | **DELETE** /applications/{application_id}/commands/{command_id} | +[**delete_application_emoji**](DefaultApi.md#delete_application_emoji) | **DELETE** /applications/{application_id}/emojis/{emoji_id} | +[**delete_application_user_role_connection**](DefaultApi.md#delete_application_user_role_connection) | **DELETE** /users/@me/applications/{application_id}/role-connection | +[**delete_auto_moderation_rule**](DefaultApi.md#delete_auto_moderation_rule) | **DELETE** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +[**delete_channel**](DefaultApi.md#delete_channel) | **DELETE** /channels/{channel_id} | +[**delete_channel_permission_overwrite**](DefaultApi.md#delete_channel_permission_overwrite) | **DELETE** /channels/{channel_id}/permissions/{overwrite_id} | +[**delete_entitlement**](DefaultApi.md#delete_entitlement) | **DELETE** /applications/{application_id}/entitlements/{entitlement_id} | +[**delete_group_dm_user**](DefaultApi.md#delete_group_dm_user) | **DELETE** /channels/{channel_id}/recipients/{user_id} | +[**delete_guild**](DefaultApi.md#delete_guild) | **DELETE** /guilds/{guild_id} | +[**delete_guild_application_command**](DefaultApi.md#delete_guild_application_command) | **DELETE** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +[**delete_guild_emoji**](DefaultApi.md#delete_guild_emoji) | **DELETE** /guilds/{guild_id}/emojis/{emoji_id} | +[**delete_guild_integration**](DefaultApi.md#delete_guild_integration) | **DELETE** /guilds/{guild_id}/integrations/{integration_id} | +[**delete_guild_member**](DefaultApi.md#delete_guild_member) | **DELETE** /guilds/{guild_id}/members/{user_id} | +[**delete_guild_member_role**](DefaultApi.md#delete_guild_member_role) | **DELETE** /guilds/{guild_id}/members/{user_id}/roles/{role_id} | +[**delete_guild_role**](DefaultApi.md#delete_guild_role) | **DELETE** /guilds/{guild_id}/roles/{role_id} | +[**delete_guild_scheduled_event**](DefaultApi.md#delete_guild_scheduled_event) | **DELETE** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +[**delete_guild_soundboard_sound**](DefaultApi.md#delete_guild_soundboard_sound) | **DELETE** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +[**delete_guild_sticker**](DefaultApi.md#delete_guild_sticker) | **DELETE** /guilds/{guild_id}/stickers/{sticker_id} | +[**delete_guild_template**](DefaultApi.md#delete_guild_template) | **DELETE** /guilds/{guild_id}/templates/{code} | +[**delete_lobby_member**](DefaultApi.md#delete_lobby_member) | **DELETE** /lobbies/{lobby_id}/members/{user_id} | +[**delete_message**](DefaultApi.md#delete_message) | **DELETE** /channels/{channel_id}/messages/{message_id} | +[**delete_my_message_reaction**](DefaultApi.md#delete_my_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me | +[**delete_original_webhook_message**](DefaultApi.md#delete_original_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +[**delete_pin**](DefaultApi.md#delete_pin) | **DELETE** /channels/{channel_id}/messages/pins/{message_id} | +[**delete_stage_instance**](DefaultApi.md#delete_stage_instance) | **DELETE** /stage-instances/{channel_id} | +[**delete_thread_member**](DefaultApi.md#delete_thread_member) | **DELETE** /channels/{channel_id}/thread-members/{user_id} | +[**delete_user_message_reaction**](DefaultApi.md#delete_user_message_reaction) | **DELETE** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id} | +[**delete_webhook**](DefaultApi.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | +[**delete_webhook_by_token**](DefaultApi.md#delete_webhook_by_token) | **DELETE** /webhooks/{webhook_id}/{webhook_token} | +[**delete_webhook_message**](DefaultApi.md#delete_webhook_message) | **DELETE** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +[**deprecated_create_pin**](DefaultApi.md#deprecated_create_pin) | **PUT** /channels/{channel_id}/pins/{message_id} | +[**deprecated_delete_pin**](DefaultApi.md#deprecated_delete_pin) | **DELETE** /channels/{channel_id}/pins/{message_id} | +[**deprecated_list_pins**](DefaultApi.md#deprecated_list_pins) | **GET** /channels/{channel_id}/pins | +[**edit_lobby**](DefaultApi.md#edit_lobby) | **PATCH** /lobbies/{lobby_id} | +[**edit_lobby_channel_link**](DefaultApi.md#edit_lobby_channel_link) | **PATCH** /lobbies/{lobby_id}/channel-linking | +[**execute_github_compatible_webhook**](DefaultApi.md#execute_github_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/github | +[**execute_slack_compatible_webhook**](DefaultApi.md#execute_slack_compatible_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token}/slack | +[**execute_webhook**](DefaultApi.md#execute_webhook) | **POST** /webhooks/{webhook_id}/{webhook_token} | +[**follow_channel**](DefaultApi.md#follow_channel) | **POST** /channels/{channel_id}/followers | +[**get_active_guild_threads**](DefaultApi.md#get_active_guild_threads) | **GET** /guilds/{guild_id}/threads/active | +[**get_answer_voters**](DefaultApi.md#get_answer_voters) | **GET** /channels/{channel_id}/polls/{message_id}/answers/{answer_id} | +[**get_application**](DefaultApi.md#get_application) | **GET** /applications/{application_id} | +[**get_application_command**](DefaultApi.md#get_application_command) | **GET** /applications/{application_id}/commands/{command_id} | +[**get_application_emoji**](DefaultApi.md#get_application_emoji) | **GET** /applications/{application_id}/emojis/{emoji_id} | +[**get_application_role_connections_metadata**](DefaultApi.md#get_application_role_connections_metadata) | **GET** /applications/{application_id}/role-connections/metadata | +[**get_application_user_role_connection**](DefaultApi.md#get_application_user_role_connection) | **GET** /users/@me/applications/{application_id}/role-connection | +[**get_auto_moderation_rule**](DefaultApi.md#get_auto_moderation_rule) | **GET** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +[**get_bot_gateway**](DefaultApi.md#get_bot_gateway) | **GET** /gateway/bot | +[**get_channel**](DefaultApi.md#get_channel) | **GET** /channels/{channel_id} | +[**get_entitlement**](DefaultApi.md#get_entitlement) | **GET** /applications/{application_id}/entitlements/{entitlement_id} | +[**get_entitlements**](DefaultApi.md#get_entitlements) | **GET** /applications/{application_id}/entitlements | +[**get_gateway**](DefaultApi.md#get_gateway) | **GET** /gateway | +[**get_guild**](DefaultApi.md#get_guild) | **GET** /guilds/{guild_id} | +[**get_guild_application_command**](DefaultApi.md#get_guild_application_command) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +[**get_guild_application_command_permissions**](DefaultApi.md#get_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions | +[**get_guild_ban**](DefaultApi.md#get_guild_ban) | **GET** /guilds/{guild_id}/bans/{user_id} | +[**get_guild_emoji**](DefaultApi.md#get_guild_emoji) | **GET** /guilds/{guild_id}/emojis/{emoji_id} | +[**get_guild_member**](DefaultApi.md#get_guild_member) | **GET** /guilds/{guild_id}/members/{user_id} | +[**get_guild_new_member_welcome**](DefaultApi.md#get_guild_new_member_welcome) | **GET** /guilds/{guild_id}/new-member-welcome | +[**get_guild_preview**](DefaultApi.md#get_guild_preview) | **GET** /guilds/{guild_id}/preview | +[**get_guild_role**](DefaultApi.md#get_guild_role) | **GET** /guilds/{guild_id}/roles/{role_id} | +[**get_guild_scheduled_event**](DefaultApi.md#get_guild_scheduled_event) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +[**get_guild_soundboard_sound**](DefaultApi.md#get_guild_soundboard_sound) | **GET** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +[**get_guild_sticker**](DefaultApi.md#get_guild_sticker) | **GET** /guilds/{guild_id}/stickers/{sticker_id} | +[**get_guild_template**](DefaultApi.md#get_guild_template) | **GET** /guilds/templates/{code} | +[**get_guild_vanity_url**](DefaultApi.md#get_guild_vanity_url) | **GET** /guilds/{guild_id}/vanity-url | +[**get_guild_webhooks**](DefaultApi.md#get_guild_webhooks) | **GET** /guilds/{guild_id}/webhooks | +[**get_guild_welcome_screen**](DefaultApi.md#get_guild_welcome_screen) | **GET** /guilds/{guild_id}/welcome-screen | +[**get_guild_widget**](DefaultApi.md#get_guild_widget) | **GET** /guilds/{guild_id}/widget.json | +[**get_guild_widget_png**](DefaultApi.md#get_guild_widget_png) | **GET** /guilds/{guild_id}/widget.png | +[**get_guild_widget_settings**](DefaultApi.md#get_guild_widget_settings) | **GET** /guilds/{guild_id}/widget | +[**get_guilds_onboarding**](DefaultApi.md#get_guilds_onboarding) | **GET** /guilds/{guild_id}/onboarding | +[**get_lobby**](DefaultApi.md#get_lobby) | **GET** /lobbies/{lobby_id} | +[**get_lobby_messages**](DefaultApi.md#get_lobby_messages) | **GET** /lobbies/{lobby_id}/messages | +[**get_message**](DefaultApi.md#get_message) | **GET** /channels/{channel_id}/messages/{message_id} | +[**get_my_application**](DefaultApi.md#get_my_application) | **GET** /applications/@me | +[**get_my_guild_member**](DefaultApi.md#get_my_guild_member) | **GET** /users/@me/guilds/{guild_id}/member | +[**get_my_oauth2_application**](DefaultApi.md#get_my_oauth2_application) | **GET** /oauth2/applications/@me | +[**get_my_oauth2_authorization**](DefaultApi.md#get_my_oauth2_authorization) | **GET** /oauth2/@me | +[**get_my_user**](DefaultApi.md#get_my_user) | **GET** /users/@me | +[**get_openid_connect_userinfo**](DefaultApi.md#get_openid_connect_userinfo) | **GET** /oauth2/userinfo | +[**get_original_webhook_message**](DefaultApi.md#get_original_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +[**get_public_keys**](DefaultApi.md#get_public_keys) | **GET** /oauth2/keys | +[**get_self_voice_state**](DefaultApi.md#get_self_voice_state) | **GET** /guilds/{guild_id}/voice-states/@me | +[**get_soundboard_default_sounds**](DefaultApi.md#get_soundboard_default_sounds) | **GET** /soundboard-default-sounds | +[**get_stage_instance**](DefaultApi.md#get_stage_instance) | **GET** /stage-instances/{channel_id} | +[**get_sticker**](DefaultApi.md#get_sticker) | **GET** /stickers/{sticker_id} | +[**get_sticker_pack**](DefaultApi.md#get_sticker_pack) | **GET** /sticker-packs/{pack_id} | +[**get_thread_member**](DefaultApi.md#get_thread_member) | **GET** /channels/{channel_id}/thread-members/{user_id} | +[**get_user**](DefaultApi.md#get_user) | **GET** /users/{user_id} | +[**get_voice_state**](DefaultApi.md#get_voice_state) | **GET** /guilds/{guild_id}/voice-states/{user_id} | +[**get_webhook**](DefaultApi.md#get_webhook) | **GET** /webhooks/{webhook_id} | +[**get_webhook_by_token**](DefaultApi.md#get_webhook_by_token) | **GET** /webhooks/{webhook_id}/{webhook_token} | +[**get_webhook_message**](DefaultApi.md#get_webhook_message) | **GET** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +[**invite_resolve**](DefaultApi.md#invite_resolve) | **GET** /invites/{code} | +[**invite_revoke**](DefaultApi.md#invite_revoke) | **DELETE** /invites/{code} | +[**join_thread**](DefaultApi.md#join_thread) | **PUT** /channels/{channel_id}/thread-members/@me | +[**leave_guild**](DefaultApi.md#leave_guild) | **DELETE** /users/@me/guilds/{guild_id} | +[**leave_lobby**](DefaultApi.md#leave_lobby) | **DELETE** /lobbies/{lobby_id}/members/@me | +[**leave_thread**](DefaultApi.md#leave_thread) | **DELETE** /channels/{channel_id}/thread-members/@me | +[**list_application_commands**](DefaultApi.md#list_application_commands) | **GET** /applications/{application_id}/commands | +[**list_application_emojis**](DefaultApi.md#list_application_emojis) | **GET** /applications/{application_id}/emojis | +[**list_auto_moderation_rules**](DefaultApi.md#list_auto_moderation_rules) | **GET** /guilds/{guild_id}/auto-moderation/rules | +[**list_channel_invites**](DefaultApi.md#list_channel_invites) | **GET** /channels/{channel_id}/invites | +[**list_channel_webhooks**](DefaultApi.md#list_channel_webhooks) | **GET** /channels/{channel_id}/webhooks | +[**list_guild_application_command_permissions**](DefaultApi.md#list_guild_application_command_permissions) | **GET** /applications/{application_id}/guilds/{guild_id}/commands/permissions | +[**list_guild_application_commands**](DefaultApi.md#list_guild_application_commands) | **GET** /applications/{application_id}/guilds/{guild_id}/commands | +[**list_guild_audit_log_entries**](DefaultApi.md#list_guild_audit_log_entries) | **GET** /guilds/{guild_id}/audit-logs | +[**list_guild_bans**](DefaultApi.md#list_guild_bans) | **GET** /guilds/{guild_id}/bans | +[**list_guild_channels**](DefaultApi.md#list_guild_channels) | **GET** /guilds/{guild_id}/channels | +[**list_guild_emojis**](DefaultApi.md#list_guild_emojis) | **GET** /guilds/{guild_id}/emojis | +[**list_guild_integrations**](DefaultApi.md#list_guild_integrations) | **GET** /guilds/{guild_id}/integrations | +[**list_guild_invites**](DefaultApi.md#list_guild_invites) | **GET** /guilds/{guild_id}/invites | +[**list_guild_members**](DefaultApi.md#list_guild_members) | **GET** /guilds/{guild_id}/members | +[**list_guild_roles**](DefaultApi.md#list_guild_roles) | **GET** /guilds/{guild_id}/roles | +[**list_guild_scheduled_event_users**](DefaultApi.md#list_guild_scheduled_event_users) | **GET** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users | +[**list_guild_scheduled_events**](DefaultApi.md#list_guild_scheduled_events) | **GET** /guilds/{guild_id}/scheduled-events | +[**list_guild_soundboard_sounds**](DefaultApi.md#list_guild_soundboard_sounds) | **GET** /guilds/{guild_id}/soundboard-sounds | +[**list_guild_stickers**](DefaultApi.md#list_guild_stickers) | **GET** /guilds/{guild_id}/stickers | +[**list_guild_templates**](DefaultApi.md#list_guild_templates) | **GET** /guilds/{guild_id}/templates | +[**list_guild_voice_regions**](DefaultApi.md#list_guild_voice_regions) | **GET** /guilds/{guild_id}/regions | +[**list_message_reactions_by_emoji**](DefaultApi.md#list_message_reactions_by_emoji) | **GET** /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} | +[**list_messages**](DefaultApi.md#list_messages) | **GET** /channels/{channel_id}/messages | +[**list_my_connections**](DefaultApi.md#list_my_connections) | **GET** /users/@me/connections | +[**list_my_guilds**](DefaultApi.md#list_my_guilds) | **GET** /users/@me/guilds | +[**list_my_private_archived_threads**](DefaultApi.md#list_my_private_archived_threads) | **GET** /channels/{channel_id}/users/@me/threads/archived/private | +[**list_pins**](DefaultApi.md#list_pins) | **GET** /channels/{channel_id}/messages/pins | +[**list_private_archived_threads**](DefaultApi.md#list_private_archived_threads) | **GET** /channels/{channel_id}/threads/archived/private | +[**list_public_archived_threads**](DefaultApi.md#list_public_archived_threads) | **GET** /channels/{channel_id}/threads/archived/public | +[**list_sticker_packs**](DefaultApi.md#list_sticker_packs) | **GET** /sticker-packs | +[**list_thread_members**](DefaultApi.md#list_thread_members) | **GET** /channels/{channel_id}/thread-members | +[**list_voice_regions**](DefaultApi.md#list_voice_regions) | **GET** /voice/regions | +[**partner_sdk_token**](DefaultApi.md#partner_sdk_token) | **POST** /partner-sdk/token | +[**partner_sdk_unmerge_provisional_account**](DefaultApi.md#partner_sdk_unmerge_provisional_account) | **POST** /partner-sdk/provisional-accounts/unmerge | +[**poll_expire**](DefaultApi.md#poll_expire) | **POST** /channels/{channel_id}/polls/{message_id}/expire | +[**preview_prune_guild**](DefaultApi.md#preview_prune_guild) | **GET** /guilds/{guild_id}/prune | +[**prune_guild**](DefaultApi.md#prune_guild) | **POST** /guilds/{guild_id}/prune | +[**put_guilds_onboarding**](DefaultApi.md#put_guilds_onboarding) | **PUT** /guilds/{guild_id}/onboarding | +[**search_guild_members**](DefaultApi.md#search_guild_members) | **GET** /guilds/{guild_id}/members/search | +[**send_soundboard_sound**](DefaultApi.md#send_soundboard_sound) | **POST** /channels/{channel_id}/send-soundboard-sound | +[**set_channel_permission_overwrite**](DefaultApi.md#set_channel_permission_overwrite) | **PUT** /channels/{channel_id}/permissions/{overwrite_id} | +[**set_guild_application_command_permissions**](DefaultApi.md#set_guild_application_command_permissions) | **PUT** /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions | +[**set_guild_mfa_level**](DefaultApi.md#set_guild_mfa_level) | **POST** /guilds/{guild_id}/mfa | +[**sync_guild_template**](DefaultApi.md#sync_guild_template) | **PUT** /guilds/{guild_id}/templates/{code} | +[**thread_search**](DefaultApi.md#thread_search) | **GET** /channels/{channel_id}/threads/search | +[**trigger_typing_indicator**](DefaultApi.md#trigger_typing_indicator) | **POST** /channels/{channel_id}/typing | +[**unban_user_from_guild**](DefaultApi.md#unban_user_from_guild) | **DELETE** /guilds/{guild_id}/bans/{user_id} | +[**update_application**](DefaultApi.md#update_application) | **PATCH** /applications/{application_id} | +[**update_application_command**](DefaultApi.md#update_application_command) | **PATCH** /applications/{application_id}/commands/{command_id} | +[**update_application_emoji**](DefaultApi.md#update_application_emoji) | **PATCH** /applications/{application_id}/emojis/{emoji_id} | +[**update_application_role_connections_metadata**](DefaultApi.md#update_application_role_connections_metadata) | **PUT** /applications/{application_id}/role-connections/metadata | +[**update_application_user_role_connection**](DefaultApi.md#update_application_user_role_connection) | **PUT** /users/@me/applications/{application_id}/role-connection | +[**update_auto_moderation_rule**](DefaultApi.md#update_auto_moderation_rule) | **PATCH** /guilds/{guild_id}/auto-moderation/rules/{rule_id} | +[**update_channel**](DefaultApi.md#update_channel) | **PATCH** /channels/{channel_id} | +[**update_guild**](DefaultApi.md#update_guild) | **PATCH** /guilds/{guild_id} | +[**update_guild_application_command**](DefaultApi.md#update_guild_application_command) | **PATCH** /applications/{application_id}/guilds/{guild_id}/commands/{command_id} | +[**update_guild_emoji**](DefaultApi.md#update_guild_emoji) | **PATCH** /guilds/{guild_id}/emojis/{emoji_id} | +[**update_guild_member**](DefaultApi.md#update_guild_member) | **PATCH** /guilds/{guild_id}/members/{user_id} | +[**update_guild_role**](DefaultApi.md#update_guild_role) | **PATCH** /guilds/{guild_id}/roles/{role_id} | +[**update_guild_scheduled_event**](DefaultApi.md#update_guild_scheduled_event) | **PATCH** /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} | +[**update_guild_soundboard_sound**](DefaultApi.md#update_guild_soundboard_sound) | **PATCH** /guilds/{guild_id}/soundboard-sounds/{sound_id} | +[**update_guild_sticker**](DefaultApi.md#update_guild_sticker) | **PATCH** /guilds/{guild_id}/stickers/{sticker_id} | +[**update_guild_template**](DefaultApi.md#update_guild_template) | **PATCH** /guilds/{guild_id}/templates/{code} | +[**update_guild_welcome_screen**](DefaultApi.md#update_guild_welcome_screen) | **PATCH** /guilds/{guild_id}/welcome-screen | +[**update_guild_widget_settings**](DefaultApi.md#update_guild_widget_settings) | **PATCH** /guilds/{guild_id}/widget | +[**update_message**](DefaultApi.md#update_message) | **PATCH** /channels/{channel_id}/messages/{message_id} | +[**update_my_application**](DefaultApi.md#update_my_application) | **PATCH** /applications/@me | +[**update_my_guild_member**](DefaultApi.md#update_my_guild_member) | **PATCH** /guilds/{guild_id}/members/@me | +[**update_my_user**](DefaultApi.md#update_my_user) | **PATCH** /users/@me | +[**update_original_webhook_message**](DefaultApi.md#update_original_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/@original | +[**update_self_voice_state**](DefaultApi.md#update_self_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/@me | +[**update_stage_instance**](DefaultApi.md#update_stage_instance) | **PATCH** /stage-instances/{channel_id} | +[**update_voice_state**](DefaultApi.md#update_voice_state) | **PATCH** /guilds/{guild_id}/voice-states/{user_id} | +[**update_webhook**](DefaultApi.md#update_webhook) | **PATCH** /webhooks/{webhook_id} | +[**update_webhook_by_token**](DefaultApi.md#update_webhook_by_token) | **PATCH** /webhooks/{webhook_id}/{webhook_token} | +[**update_webhook_message**](DefaultApi.md#update_webhook_message) | **PATCH** /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} | +[**upload_application_attachment**](DefaultApi.md#upload_application_attachment) | **POST** /applications/{application_id}/attachment | + + +# **add_group_dm_user** +> AddGroupDmUser201Response add_group_dm_user(channel_id, user_id, add_group_dm_user_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + add_group_dm_user_request = dc_rest.AddGroupDmUserRequest() # AddGroupDmUserRequest | + + try: + api_response = await api_instance.add_group_dm_user(channel_id, user_id, add_group_dm_user_request) + print("The response of DefaultApi->add_group_dm_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->add_group_dm_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **user_id** | **str**| | + **add_group_dm_user_request** | [**AddGroupDmUserRequest**](AddGroupDmUserRequest.md)| | + +### Return type + +[**AddGroupDmUser201Response**](AddGroupDmUser201Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for add_group_dm_user | - | +**204** | 204 response for add_group_dm_user | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_guild_member** +> GuildMemberResponse add_guild_member(guild_id, user_id, add_guild_member_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + add_guild_member_request = dc_rest.AddGuildMemberRequest() # AddGuildMemberRequest | + + try: + api_response = await api_instance.add_guild_member(guild_id, user_id, add_guild_member_request) + print("The response of DefaultApi->add_guild_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->add_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **add_guild_member_request** | [**AddGuildMemberRequest**](AddGuildMemberRequest.md)| | + +### Return type + +[**GuildMemberResponse**](GuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for add_guild_member | - | +**204** | 204 response for add_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_guild_member_role** +> add_guild_member_role(guild_id, user_id, role_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + role_id = 'role_id_example' # str | + + try: + await api_instance.add_guild_member_role(guild_id, user_id, role_id) + except Exception as e: + print("Exception when calling DefaultApi->add_guild_member_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **role_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for add_guild_member_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_lobby_member** +> LobbyMemberResponse add_lobby_member(lobby_id, user_id, add_lobby_member_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest +from dc_rest.models.lobby_member_response import LobbyMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + user_id = 'user_id_example' # str | + add_lobby_member_request = dc_rest.AddLobbyMemberRequest() # AddLobbyMemberRequest | + + try: + api_response = await api_instance.add_lobby_member(lobby_id, user_id, add_lobby_member_request) + print("The response of DefaultApi->add_lobby_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->add_lobby_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **user_id** | **str**| | + **add_lobby_member_request** | [**AddLobbyMemberRequest**](AddLobbyMemberRequest.md)| | + +### Return type + +[**LobbyMemberResponse**](LobbyMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for add_lobby_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_my_message_reaction** +> add_my_message_reaction(channel_id, message_id, emoji_name) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + emoji_name = 'emoji_name_example' # str | + + try: + await api_instance.add_my_message_reaction(channel_id, message_id, emoji_name) + except Exception as e: + print("Exception when calling DefaultApi->add_my_message_reaction: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **emoji_name** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for add_my_message_reaction | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **add_thread_member** +> add_thread_member(channel_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.add_thread_member(channel_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->add_thread_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for add_thread_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **applications_get_activity_instance** +> EmbeddedActivityInstance applications_get_activity_instance(application_id, instance_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + instance_id = 'instance_id_example' # str | + + try: + api_response = await api_instance.applications_get_activity_instance(application_id, instance_id) + print("The response of DefaultApi->applications_get_activity_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->applications_get_activity_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **instance_id** | **str**| | + +### Return type + +[**EmbeddedActivityInstance**](EmbeddedActivityInstance.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for applications_get_activity_instance | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ban_user_from_guild** +> ban_user_from_guild(guild_id, user_id, ban_user_from_guild_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + ban_user_from_guild_request = dc_rest.BanUserFromGuildRequest() # BanUserFromGuildRequest | + + try: + await api_instance.ban_user_from_guild(guild_id, user_id, ban_user_from_guild_request) + except Exception as e: + print("Exception when calling DefaultApi->ban_user_from_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **ban_user_from_guild_request** | [**BanUserFromGuildRequest**](BanUserFromGuildRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for ban_user_from_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_ban_users_from_guild** +> BulkBanUsersResponse bulk_ban_users_from_guild(guild_id, bulk_ban_users_from_guild_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + bulk_ban_users_from_guild_request = dc_rest.BulkBanUsersFromGuildRequest() # BulkBanUsersFromGuildRequest | + + try: + api_response = await api_instance.bulk_ban_users_from_guild(guild_id, bulk_ban_users_from_guild_request) + print("The response of DefaultApi->bulk_ban_users_from_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->bulk_ban_users_from_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **bulk_ban_users_from_guild_request** | [**BulkBanUsersFromGuildRequest**](BulkBanUsersFromGuildRequest.md)| | + +### Return type + +[**BulkBanUsersResponse**](BulkBanUsersResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for bulk_ban_users_from_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_delete_messages** +> bulk_delete_messages(channel_id, bulk_delete_messages_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + bulk_delete_messages_request = dc_rest.BulkDeleteMessagesRequest() # BulkDeleteMessagesRequest | + + try: + await api_instance.bulk_delete_messages(channel_id, bulk_delete_messages_request) + except Exception as e: + print("Exception when calling DefaultApi->bulk_delete_messages: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **bulk_delete_messages_request** | [**BulkDeleteMessagesRequest**](BulkDeleteMessagesRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for bulk_delete_messages | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_set_application_commands** +> List[ApplicationCommandResponse] bulk_set_application_commands(application_id, application_command_update_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + application_command_update_request = [dc_rest.ApplicationCommandUpdateRequest()] # List[ApplicationCommandUpdateRequest] | + + try: + api_response = await api_instance.bulk_set_application_commands(application_id, application_command_update_request) + print("The response of DefaultApi->bulk_set_application_commands:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->bulk_set_application_commands: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **application_command_update_request** | [**List[ApplicationCommandUpdateRequest]**](ApplicationCommandUpdateRequest.md)| | + +### Return type + +[**List[ApplicationCommandResponse]**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for bulk_set_application_commands | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_set_guild_application_commands** +> List[ApplicationCommandResponse] bulk_set_guild_application_commands(application_id, guild_id, application_command_update_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + application_command_update_request = [dc_rest.ApplicationCommandUpdateRequest()] # List[ApplicationCommandUpdateRequest] | + + try: + api_response = await api_instance.bulk_set_guild_application_commands(application_id, guild_id, application_command_update_request) + print("The response of DefaultApi->bulk_set_guild_application_commands:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->bulk_set_guild_application_commands: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **application_command_update_request** | [**List[ApplicationCommandUpdateRequest]**](ApplicationCommandUpdateRequest.md)| | + +### Return type + +[**List[ApplicationCommandResponse]**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for bulk_set_guild_application_commands | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_update_guild_channels** +> bulk_update_guild_channels(guild_id, bulk_update_guild_channels_request_inner) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + bulk_update_guild_channels_request_inner = [dc_rest.BulkUpdateGuildChannelsRequestInner()] # List[BulkUpdateGuildChannelsRequestInner] | + + try: + await api_instance.bulk_update_guild_channels(guild_id, bulk_update_guild_channels_request_inner) + except Exception as e: + print("Exception when calling DefaultApi->bulk_update_guild_channels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **bulk_update_guild_channels_request_inner** | [**List[BulkUpdateGuildChannelsRequestInner]**](BulkUpdateGuildChannelsRequestInner.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for bulk_update_guild_channels | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_update_guild_roles** +> List[GuildRoleResponse] bulk_update_guild_roles(guild_id, bulk_update_guild_roles_request_inner) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + bulk_update_guild_roles_request_inner = [dc_rest.BulkUpdateGuildRolesRequestInner()] # List[BulkUpdateGuildRolesRequestInner] | + + try: + api_response = await api_instance.bulk_update_guild_roles(guild_id, bulk_update_guild_roles_request_inner) + print("The response of DefaultApi->bulk_update_guild_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->bulk_update_guild_roles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **bulk_update_guild_roles_request_inner** | [**List[BulkUpdateGuildRolesRequestInner]**](BulkUpdateGuildRolesRequestInner.md)| | + +### Return type + +[**List[GuildRoleResponse]**](GuildRoleResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for bulk_update_guild_roles | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **bulk_update_lobby_members** +> List[LobbyMemberResponse] bulk_update_lobby_members(lobby_id, bulk_lobby_member_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest +from dc_rest.models.lobby_member_response import LobbyMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + bulk_lobby_member_request = [dc_rest.BulkLobbyMemberRequest()] # List[BulkLobbyMemberRequest] | + + try: + api_response = await api_instance.bulk_update_lobby_members(lobby_id, bulk_lobby_member_request) + print("The response of DefaultApi->bulk_update_lobby_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->bulk_update_lobby_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **bulk_lobby_member_request** | [**List[BulkLobbyMemberRequest]**](BulkLobbyMemberRequest.md)| | + +### Return type + +[**List[LobbyMemberResponse]**](LobbyMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for bulk_update_lobby_members | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **consume_entitlement** +> consume_entitlement(application_id, entitlement_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + entitlement_id = 'entitlement_id_example' # str | + + try: + await api_instance.consume_entitlement(application_id, entitlement_id) + except Exception as e: + print("Exception when calling DefaultApi->consume_entitlement: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **entitlement_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for consume_entitlement | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_application_command** +> ApplicationCommandResponse create_application_command(application_id, application_command_create_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + application_command_create_request = dc_rest.ApplicationCommandCreateRequest() # ApplicationCommandCreateRequest | + + try: + api_response = await api_instance.create_application_command(application_id, application_command_create_request) + print("The response of DefaultApi->create_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **application_command_create_request** | [**ApplicationCommandCreateRequest**](ApplicationCommandCreateRequest.md)| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_application_command | - | +**201** | 201 response for create_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_application_emoji** +> EmojiResponse create_application_emoji(application_id, create_application_emoji_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + create_application_emoji_request = dc_rest.CreateApplicationEmojiRequest() # CreateApplicationEmojiRequest | + + try: + api_response = await api_instance.create_application_emoji(application_id, create_application_emoji_request) + print("The response of DefaultApi->create_application_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_application_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **create_application_emoji_request** | [**CreateApplicationEmojiRequest**](CreateApplicationEmojiRequest.md)| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_application_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_auto_moderation_rule** +> CreateAutoModerationRule200Response create_auto_moderation_rule(guild_id, create_auto_moderation_rule_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_auto_moderation_rule_request = dc_rest.CreateAutoModerationRuleRequest() # CreateAutoModerationRuleRequest | + + try: + api_response = await api_instance.create_auto_moderation_rule(guild_id, create_auto_moderation_rule_request) + print("The response of DefaultApi->create_auto_moderation_rule:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_auto_moderation_rule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_auto_moderation_rule_request** | [**CreateAutoModerationRuleRequest**](CreateAutoModerationRuleRequest.md)| | + +### Return type + +[**CreateAutoModerationRule200Response**](CreateAutoModerationRule200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_auto_moderation_rule | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_channel_invite** +> ListChannelInvites200ResponseInner create_channel_invite(channel_id, create_channel_invite_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + create_channel_invite_request = dc_rest.CreateChannelInviteRequest() # CreateChannelInviteRequest | + + try: + api_response = await api_instance.create_channel_invite(channel_id, create_channel_invite_request) + print("The response of DefaultApi->create_channel_invite:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_channel_invite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **create_channel_invite_request** | [**CreateChannelInviteRequest**](CreateChannelInviteRequest.md)| | + +### Return type + +[**ListChannelInvites200ResponseInner**](ListChannelInvites200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_channel_invite | - | +**204** | 204 response for create_channel_invite | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_dm** +> AddGroupDmUser201Response create_dm(create_private_channel_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + create_private_channel_request = dc_rest.CreatePrivateChannelRequest() # CreatePrivateChannelRequest | + + try: + api_response = await api_instance.create_dm(create_private_channel_request) + print("The response of DefaultApi->create_dm:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_dm: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_private_channel_request** | [**CreatePrivateChannelRequest**](CreatePrivateChannelRequest.md)| | + +### Return type + +[**AddGroupDmUser201Response**](AddGroupDmUser201Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_dm | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entitlement** +> EntitlementResponse create_entitlement(application_id, create_entitlement_request_data) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData +from dc_rest.models.entitlement_response import EntitlementResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + create_entitlement_request_data = dc_rest.CreateEntitlementRequestData() # CreateEntitlementRequestData | + + try: + api_response = await api_instance.create_entitlement(application_id, create_entitlement_request_data) + print("The response of DefaultApi->create_entitlement:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_entitlement: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **create_entitlement_request_data** | [**CreateEntitlementRequestData**](CreateEntitlementRequestData.md)| | + +### Return type + +[**EntitlementResponse**](EntitlementResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_entitlement | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild** +> GuildResponse create_guild(guild_create_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_create_request import GuildCreateRequest +from dc_rest.models.guild_response import GuildResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_create_request = dc_rest.GuildCreateRequest() # GuildCreateRequest | + + try: + api_response = await api_instance.create_guild(guild_create_request) + print("The response of DefaultApi->create_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_create_request** | [**GuildCreateRequest**](GuildCreateRequest.md)| | + +### Return type + +[**GuildResponse**](GuildResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_application_command** +> ApplicationCommandResponse create_guild_application_command(application_id, guild_id, application_command_create_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + application_command_create_request = dc_rest.ApplicationCommandCreateRequest() # ApplicationCommandCreateRequest | + + try: + api_response = await api_instance.create_guild_application_command(application_id, guild_id, application_command_create_request) + print("The response of DefaultApi->create_guild_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **application_command_create_request** | [**ApplicationCommandCreateRequest**](ApplicationCommandCreateRequest.md)| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_guild_application_command | - | +**201** | 201 response for create_guild_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_channel** +> GuildChannelResponse create_guild_channel(guild_id, create_guild_channel_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest +from dc_rest.models.guild_channel_response import GuildChannelResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_guild_channel_request = dc_rest.CreateGuildChannelRequest() # CreateGuildChannelRequest | + + try: + api_response = await api_instance.create_guild_channel(guild_id, create_guild_channel_request) + print("The response of DefaultApi->create_guild_channel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_channel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_guild_channel_request** | [**CreateGuildChannelRequest**](CreateGuildChannelRequest.md)| | + +### Return type + +[**GuildChannelResponse**](GuildChannelResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild_channel | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_emoji** +> EmojiResponse create_guild_emoji(guild_id, create_guild_emoji_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_guild_emoji_request = dc_rest.CreateGuildEmojiRequest() # CreateGuildEmojiRequest | + + try: + api_response = await api_instance.create_guild_emoji(guild_id, create_guild_emoji_request) + print("The response of DefaultApi->create_guild_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_guild_emoji_request** | [**CreateGuildEmojiRequest**](CreateGuildEmojiRequest.md)| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_from_template** +> GuildResponse create_guild_from_template(code, create_guild_from_template_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest +from dc_rest.models.guild_response import GuildResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + code = 'code_example' # str | + create_guild_from_template_request = dc_rest.CreateGuildFromTemplateRequest() # CreateGuildFromTemplateRequest | + + try: + api_response = await api_instance.create_guild_from_template(code, create_guild_from_template_request) + print("The response of DefaultApi->create_guild_from_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_from_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| | + **create_guild_from_template_request** | [**CreateGuildFromTemplateRequest**](CreateGuildFromTemplateRequest.md)| | + +### Return type + +[**GuildResponse**](GuildResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild_from_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_role** +> GuildRoleResponse create_guild_role(guild_id, create_guild_role_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_guild_role_request = dc_rest.CreateGuildRoleRequest() # CreateGuildRoleRequest | + + try: + api_response = await api_instance.create_guild_role(guild_id, create_guild_role_request) + print("The response of DefaultApi->create_guild_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_guild_role_request** | [**CreateGuildRoleRequest**](CreateGuildRoleRequest.md)| | + +### Return type + +[**GuildRoleResponse**](GuildRoleResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_guild_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_scheduled_event** +> ListGuildScheduledEvents200ResponseInner create_guild_scheduled_event(guild_id, create_guild_scheduled_event_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_guild_scheduled_event_request = dc_rest.CreateGuildScheduledEventRequest() # CreateGuildScheduledEventRequest | + + try: + api_response = await api_instance.create_guild_scheduled_event(guild_id, create_guild_scheduled_event_request) + print("The response of DefaultApi->create_guild_scheduled_event:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_scheduled_event: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_guild_scheduled_event_request** | [**CreateGuildScheduledEventRequest**](CreateGuildScheduledEventRequest.md)| | + +### Return type + +[**ListGuildScheduledEvents200ResponseInner**](ListGuildScheduledEvents200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_guild_scheduled_event | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_soundboard_sound** +> SoundboardSoundResponse create_guild_soundboard_sound(guild_id, soundboard_create_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + soundboard_create_request = dc_rest.SoundboardCreateRequest() # SoundboardCreateRequest | + + try: + api_response = await api_instance.create_guild_soundboard_sound(guild_id, soundboard_create_request) + print("The response of DefaultApi->create_guild_soundboard_sound:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_soundboard_sound: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **soundboard_create_request** | [**SoundboardCreateRequest**](SoundboardCreateRequest.md)| | + +### Return type + +[**SoundboardSoundResponse**](SoundboardSoundResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild_soundboard_sound | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_sticker** +> GuildStickerResponse create_guild_sticker(guild_id, name, tags, file, description=description) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + name = 'name_example' # str | + tags = 'tags_example' # str | + file = 'file_example' # str | + description = 'description_example' # str | (optional) + + try: + api_response = await api_instance.create_guild_sticker(guild_id, name, tags, file, description=description) + print("The response of DefaultApi->create_guild_sticker:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_sticker: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **name** | **str**| | + **tags** | **str**| | + **file** | **str**| | + **description** | **str**| | [optional] + +### Return type + +[**GuildStickerResponse**](GuildStickerResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_guild_sticker | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_guild_template** +> GuildTemplateResponse create_guild_template(guild_id, create_guild_template_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + create_guild_template_request = dc_rest.CreateGuildTemplateRequest() # CreateGuildTemplateRequest | + + try: + api_response = await api_instance.create_guild_template(guild_id, create_guild_template_request) + print("The response of DefaultApi->create_guild_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_guild_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **create_guild_template_request** | [**CreateGuildTemplateRequest**](CreateGuildTemplateRequest.md)| | + +### Return type + +[**GuildTemplateResponse**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_guild_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_interaction_response** +> InteractionCallbackResponse create_interaction_response(interaction_id, interaction_token, create_interaction_response_request, with_response=with_response) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + interaction_id = 'interaction_id_example' # str | + interaction_token = 'interaction_token_example' # str | + create_interaction_response_request = dc_rest.CreateInteractionResponseRequest() # CreateInteractionResponseRequest | + with_response = True # bool | (optional) + + try: + api_response = await api_instance.create_interaction_response(interaction_id, interaction_token, create_interaction_response_request, with_response=with_response) + print("The response of DefaultApi->create_interaction_response:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_interaction_response: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interaction_id** | **str**| | + **interaction_token** | **str**| | + **create_interaction_response_request** | [**CreateInteractionResponseRequest**](CreateInteractionResponseRequest.md)| | + **with_response** | **bool**| | [optional] + +### Return type + +[**InteractionCallbackResponse**](InteractionCallbackResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_interaction_response | - | +**204** | 204 response for create_interaction_response | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_lobby** +> LobbyResponse create_lobby(create_lobby_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_lobby_request import CreateLobbyRequest +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + create_lobby_request = dc_rest.CreateLobbyRequest() # CreateLobbyRequest | + + try: + api_response = await api_instance.create_lobby(create_lobby_request) + print("The response of DefaultApi->create_lobby:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_lobby: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_lobby_request** | [**CreateLobbyRequest**](CreateLobbyRequest.md)| | + +### Return type + +[**LobbyResponse**](LobbyResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_lobby | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_lobby_message** +> LobbyMessageResponse create_lobby_message(lobby_id, sdk_message_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.lobby_message_response import LobbyMessageResponse +from dc_rest.models.sdk_message_request import SDKMessageRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + sdk_message_request = dc_rest.SDKMessageRequest() # SDKMessageRequest | + + try: + api_response = await api_instance.create_lobby_message(lobby_id, sdk_message_request) + print("The response of DefaultApi->create_lobby_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_lobby_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **sdk_message_request** | [**SDKMessageRequest**](SDKMessageRequest.md)| | + +### Return type + +[**LobbyMessageResponse**](LobbyMessageResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_lobby_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_message** +> MessageResponse create_message(channel_id, message_create_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_create_request import MessageCreateRequest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_create_request = dc_rest.MessageCreateRequest() # MessageCreateRequest | + + try: + api_response = await api_instance.create_message(channel_id, message_create_request) + print("The response of DefaultApi->create_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_create_request** | [**MessageCreateRequest**](MessageCreateRequest.md)| | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_or_join_lobby** +> LobbyResponse create_or_join_lobby(create_or_join_lobby_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + create_or_join_lobby_request = dc_rest.CreateOrJoinLobbyRequest() # CreateOrJoinLobbyRequest | + + try: + api_response = await api_instance.create_or_join_lobby(create_or_join_lobby_request) + print("The response of DefaultApi->create_or_join_lobby:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_or_join_lobby: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_or_join_lobby_request** | [**CreateOrJoinLobbyRequest**](CreateOrJoinLobbyRequest.md)| | + +### Return type + +[**LobbyResponse**](LobbyResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_or_join_lobby | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_pin** +> create_pin(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.create_pin(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->create_pin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for create_pin | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_stage_instance** +> StageInstanceResponse create_stage_instance(create_stage_instance_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest +from dc_rest.models.stage_instance_response import StageInstanceResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + create_stage_instance_request = dc_rest.CreateStageInstanceRequest() # CreateStageInstanceRequest | + + try: + api_response = await api_instance.create_stage_instance(create_stage_instance_request) + print("The response of DefaultApi->create_stage_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_stage_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_stage_instance_request** | [**CreateStageInstanceRequest**](CreateStageInstanceRequest.md)| | + +### Return type + +[**StageInstanceResponse**](StageInstanceResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_stage_instance | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_thread** +> CreatedThreadResponse create_thread(channel_id, create_thread_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_thread_request import CreateThreadRequest +from dc_rest.models.created_thread_response import CreatedThreadResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + create_thread_request = dc_rest.CreateThreadRequest() # CreateThreadRequest | + + try: + api_response = await api_instance.create_thread(channel_id, create_thread_request) + print("The response of DefaultApi->create_thread:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_thread: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **create_thread_request** | [**CreateThreadRequest**](CreateThreadRequest.md)| | + +### Return type + +[**CreatedThreadResponse**](CreatedThreadResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_thread | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_thread_from_message** +> ThreadResponse create_thread_from_message(channel_id, message_id, create_text_thread_with_message_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest +from dc_rest.models.thread_response import ThreadResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + create_text_thread_with_message_request = dc_rest.CreateTextThreadWithMessageRequest() # CreateTextThreadWithMessageRequest | + + try: + api_response = await api_instance.create_thread_from_message(channel_id, message_id, create_text_thread_with_message_request) + print("The response of DefaultApi->create_thread_from_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_thread_from_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **create_text_thread_with_message_request** | [**CreateTextThreadWithMessageRequest**](CreateTextThreadWithMessageRequest.md)| | + +### Return type + +[**ThreadResponse**](ThreadResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 201 response for create_thread_from_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_webhook** +> GuildIncomingWebhookResponse create_webhook(channel_id, create_webhook_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_webhook_request import CreateWebhookRequest +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + create_webhook_request = dc_rest.CreateWebhookRequest() # CreateWebhookRequest | + + try: + api_response = await api_instance.create_webhook(channel_id, create_webhook_request) + print("The response of DefaultApi->create_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **create_webhook_request** | [**CreateWebhookRequest**](CreateWebhookRequest.md)| | + +### Return type + +[**GuildIncomingWebhookResponse**](GuildIncomingWebhookResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for create_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **crosspost_message** +> MessageResponse crosspost_message(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + api_response = await api_instance.crosspost_message(channel_id, message_id) + print("The response of DefaultApi->crosspost_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->crosspost_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for crosspost_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_all_message_reactions** +> delete_all_message_reactions(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.delete_all_message_reactions(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_all_message_reactions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_all_message_reactions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_all_message_reactions_by_emoji** +> delete_all_message_reactions_by_emoji(channel_id, message_id, emoji_name) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + emoji_name = 'emoji_name_example' # str | + + try: + await api_instance.delete_all_message_reactions_by_emoji(channel_id, message_id, emoji_name) + except Exception as e: + print("Exception when calling DefaultApi->delete_all_message_reactions_by_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **emoji_name** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_all_message_reactions_by_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_application_command** +> delete_application_command(application_id, command_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + command_id = 'command_id_example' # str | + + try: + await api_instance.delete_application_command(application_id, command_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **command_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_application_emoji** +> delete_application_emoji(application_id, emoji_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + emoji_id = 'emoji_id_example' # str | + + try: + await api_instance.delete_application_emoji(application_id, emoji_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_application_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **emoji_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_application_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_application_user_role_connection** +> delete_application_user_role_connection(application_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + + try: + await api_instance.delete_application_user_role_connection(application_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_application_user_role_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_application_user_role_connection | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_auto_moderation_rule** +> delete_auto_moderation_rule(guild_id, rule_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + rule_id = 'rule_id_example' # str | + + try: + await api_instance.delete_auto_moderation_rule(guild_id, rule_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_auto_moderation_rule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **rule_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_auto_moderation_rule | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_channel** +> GetChannel200Response delete_channel(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.delete_channel(channel_id) + print("The response of DefaultApi->delete_channel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->delete_channel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**GetChannel200Response**](GetChannel200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for delete_channel | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_channel_permission_overwrite** +> delete_channel_permission_overwrite(channel_id, overwrite_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + overwrite_id = 'overwrite_id_example' # str | + + try: + await api_instance.delete_channel_permission_overwrite(channel_id, overwrite_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_channel_permission_overwrite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **overwrite_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_channel_permission_overwrite | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entitlement** +> delete_entitlement(application_id, entitlement_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + entitlement_id = 'entitlement_id_example' # str | + + try: + await api_instance.delete_entitlement(application_id, entitlement_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_entitlement: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **entitlement_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_entitlement | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_group_dm_user** +> delete_group_dm_user(channel_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.delete_group_dm_user(channel_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_group_dm_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_group_dm_user | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild** +> delete_guild(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + await api_instance.delete_guild(guild_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_application_command** +> delete_guild_application_command(application_id, guild_id, command_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + command_id = 'command_id_example' # str | + + try: + await api_instance.delete_guild_application_command(application_id, guild_id, command_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **command_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_emoji** +> delete_guild_emoji(guild_id, emoji_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + emoji_id = 'emoji_id_example' # str | + + try: + await api_instance.delete_guild_emoji(guild_id, emoji_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **emoji_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_integration** +> delete_guild_integration(guild_id, integration_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + integration_id = 'integration_id_example' # str | + + try: + await api_instance.delete_guild_integration(guild_id, integration_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **integration_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_integration | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_member** +> delete_guild_member(guild_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.delete_guild_member(guild_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_member_role** +> delete_guild_member_role(guild_id, user_id, role_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + role_id = 'role_id_example' # str | + + try: + await api_instance.delete_guild_member_role(guild_id, user_id, role_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_member_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **role_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_member_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_role** +> delete_guild_role(guild_id, role_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + role_id = 'role_id_example' # str | + + try: + await api_instance.delete_guild_role(guild_id, role_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **role_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_scheduled_event** +> delete_guild_scheduled_event(guild_id, guild_scheduled_event_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + guild_scheduled_event_id = 'guild_scheduled_event_id_example' # str | + + try: + await api_instance.delete_guild_scheduled_event(guild_id, guild_scheduled_event_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_scheduled_event: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **guild_scheduled_event_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_scheduled_event | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_soundboard_sound** +> delete_guild_soundboard_sound(guild_id, sound_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sound_id = 'sound_id_example' # str | + + try: + await api_instance.delete_guild_soundboard_sound(guild_id, sound_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_soundboard_sound: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sound_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_soundboard_sound | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_sticker** +> delete_guild_sticker(guild_id, sticker_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sticker_id = 'sticker_id_example' # str | + + try: + await api_instance.delete_guild_sticker(guild_id, sticker_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_sticker: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sticker_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_guild_sticker | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_guild_template** +> GuildTemplateResponse delete_guild_template(guild_id, code) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + code = 'code_example' # str | + + try: + api_response = await api_instance.delete_guild_template(guild_id, code) + print("The response of DefaultApi->delete_guild_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->delete_guild_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **code** | **str**| | + +### Return type + +[**GuildTemplateResponse**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for delete_guild_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_lobby_member** +> delete_lobby_member(lobby_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.delete_lobby_member(lobby_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_lobby_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_lobby_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_message** +> delete_message(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.delete_message(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_my_message_reaction** +> delete_my_message_reaction(channel_id, message_id, emoji_name) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + emoji_name = 'emoji_name_example' # str | + + try: + await api_instance.delete_my_message_reaction(channel_id, message_id, emoji_name) + except Exception as e: + print("Exception when calling DefaultApi->delete_my_message_reaction: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **emoji_name** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_my_message_reaction | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_original_webhook_message** +> delete_original_webhook_message(webhook_id, webhook_token, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + thread_id = 'thread_id_example' # str | (optional) + + try: + await api_instance.delete_original_webhook_message(webhook_id, webhook_token, thread_id=thread_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_original_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **thread_id** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_original_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_pin** +> delete_pin(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.delete_pin(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_pin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_pin | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_stage_instance** +> delete_stage_instance(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + await api_instance.delete_stage_instance(channel_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_stage_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_stage_instance | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_thread_member** +> delete_thread_member(channel_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.delete_thread_member(channel_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_thread_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_thread_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_user_message_reaction** +> delete_user_message_reaction(channel_id, message_id, emoji_name, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + emoji_name = 'emoji_name_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.delete_user_message_reaction(channel_id, message_id, emoji_name, user_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_user_message_reaction: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **emoji_name** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_user_message_reaction | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_webhook** +> delete_webhook(webhook_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + await api_instance.delete_webhook(webhook_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_webhook_by_token** +> delete_webhook_by_token(webhook_id, webhook_token) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + + try: + await api_instance.delete_webhook_by_token(webhook_id, webhook_token) + except Exception as e: + print("Exception when calling DefaultApi->delete_webhook_by_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_webhook_by_token | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_webhook_message** +> delete_webhook_message(webhook_id, webhook_token, message_id, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + message_id = 'message_id_example' # str | + thread_id = 'thread_id_example' # str | (optional) + + try: + await api_instance.delete_webhook_message(webhook_id, webhook_token, message_id, thread_id=thread_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **message_id** | **str**| | + **thread_id** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for delete_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deprecated_create_pin** +> deprecated_create_pin(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.deprecated_create_pin(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->deprecated_create_pin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for deprecated_create_pin | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deprecated_delete_pin** +> deprecated_delete_pin(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + await api_instance.deprecated_delete_pin(channel_id, message_id) + except Exception as e: + print("Exception when calling DefaultApi->deprecated_delete_pin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for deprecated_delete_pin | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deprecated_list_pins** +> List[MessageResponse] deprecated_list_pins(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.deprecated_list_pins(channel_id) + print("The response of DefaultApi->deprecated_list_pins:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->deprecated_list_pins: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**List[MessageResponse]**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for deprecated_list_pins | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **edit_lobby** +> LobbyResponse edit_lobby(lobby_id, create_lobby_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_lobby_request import CreateLobbyRequest +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + create_lobby_request = dc_rest.CreateLobbyRequest() # CreateLobbyRequest | + + try: + api_response = await api_instance.edit_lobby(lobby_id, create_lobby_request) + print("The response of DefaultApi->edit_lobby:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->edit_lobby: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **create_lobby_request** | [**CreateLobbyRequest**](CreateLobbyRequest.md)| | + +### Return type + +[**LobbyResponse**](LobbyResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for edit_lobby | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **edit_lobby_channel_link** +> LobbyResponse edit_lobby_channel_link(lobby_id, edit_lobby_channel_link_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + edit_lobby_channel_link_request = dc_rest.EditLobbyChannelLinkRequest() # EditLobbyChannelLinkRequest | + + try: + api_response = await api_instance.edit_lobby_channel_link(lobby_id, edit_lobby_channel_link_request) + print("The response of DefaultApi->edit_lobby_channel_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->edit_lobby_channel_link: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **edit_lobby_channel_link_request** | [**EditLobbyChannelLinkRequest**](EditLobbyChannelLinkRequest.md)| | + +### Return type + +[**LobbyResponse**](LobbyResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for edit_lobby_channel_link | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **execute_github_compatible_webhook** +> execute_github_compatible_webhook(webhook_id, webhook_token, github_webhook, wait=wait, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.github_webhook import GithubWebhook +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + github_webhook = dc_rest.GithubWebhook() # GithubWebhook | + wait = True # bool | (optional) + thread_id = 'thread_id_example' # str | (optional) + + try: + await api_instance.execute_github_compatible_webhook(webhook_id, webhook_token, github_webhook, wait=wait, thread_id=thread_id) + except Exception as e: + print("Exception when calling DefaultApi->execute_github_compatible_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **github_webhook** | [**GithubWebhook**](GithubWebhook.md)| | + **wait** | **bool**| | [optional] + **thread_id** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for execute_github_compatible_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **execute_slack_compatible_webhook** +> str execute_slack_compatible_webhook(webhook_id, webhook_token, slack_webhook, wait=wait, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.slack_webhook import SlackWebhook +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + slack_webhook = dc_rest.SlackWebhook() # SlackWebhook | + wait = True # bool | (optional) + thread_id = 'thread_id_example' # str | (optional) + + try: + api_response = await api_instance.execute_slack_compatible_webhook(webhook_id, webhook_token, slack_webhook, wait=wait, thread_id=thread_id) + print("The response of DefaultApi->execute_slack_compatible_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->execute_slack_compatible_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **slack_webhook** | [**SlackWebhook**](SlackWebhook.md)| | + **wait** | **bool**| | [optional] + **thread_id** | **str**| | [optional] + +### Return type + +**str** + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for execute_slack_compatible_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **execute_webhook** +> MessageResponse execute_webhook(webhook_id, webhook_token, execute_webhook_request, wait=wait, thread_id=thread_id, with_components=with_components) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + execute_webhook_request = dc_rest.ExecuteWebhookRequest() # ExecuteWebhookRequest | + wait = True # bool | (optional) + thread_id = 'thread_id_example' # str | (optional) + with_components = True # bool | (optional) + + try: + api_response = await api_instance.execute_webhook(webhook_id, webhook_token, execute_webhook_request, wait=wait, thread_id=thread_id, with_components=with_components) + print("The response of DefaultApi->execute_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->execute_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **execute_webhook_request** | [**ExecuteWebhookRequest**](ExecuteWebhookRequest.md)| | + **wait** | **bool**| | [optional] + **thread_id** | **str**| | [optional] + **with_components** | **bool**| | [optional] + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for execute_webhook | - | +**204** | 204 response for execute_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **follow_channel** +> ChannelFollowerResponse follow_channel(channel_id, follow_channel_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.channel_follower_response import ChannelFollowerResponse +from dc_rest.models.follow_channel_request import FollowChannelRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + follow_channel_request = dc_rest.FollowChannelRequest() # FollowChannelRequest | + + try: + api_response = await api_instance.follow_channel(channel_id, follow_channel_request) + print("The response of DefaultApi->follow_channel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->follow_channel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **follow_channel_request** | [**FollowChannelRequest**](FollowChannelRequest.md)| | + +### Return type + +[**ChannelFollowerResponse**](ChannelFollowerResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for follow_channel | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_active_guild_threads** +> ThreadsResponse get_active_guild_threads(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_active_guild_threads(guild_id) + print("The response of DefaultApi->get_active_guild_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_active_guild_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**ThreadsResponse**](ThreadsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_active_guild_threads | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_answer_voters** +> PollAnswerDetailsResponse get_answer_voters(channel_id, message_id, answer_id, after=after, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + answer_id = 56 # int | + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.get_answer_voters(channel_id, message_id, answer_id, after=after, limit=limit) + print("The response of DefaultApi->get_answer_voters:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_answer_voters: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **answer_id** | **int**| | + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**PollAnswerDetailsResponse**](PollAnswerDetailsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_answer_voters | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_application** +> PrivateApplicationResponse get_application(application_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + + try: + api_response = await api_instance.get_application(application_id) + print("The response of DefaultApi->get_application:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_application: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + +### Return type + +[**PrivateApplicationResponse**](PrivateApplicationResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_application | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_application_command** +> ApplicationCommandResponse get_application_command(application_id, command_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + command_id = 'command_id_example' # str | + + try: + api_response = await api_instance.get_application_command(application_id, command_id) + print("The response of DefaultApi->get_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **command_id** | **str**| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_application_emoji** +> EmojiResponse get_application_emoji(application_id, emoji_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + emoji_id = 'emoji_id_example' # str | + + try: + api_response = await api_instance.get_application_emoji(application_id, emoji_id) + print("The response of DefaultApi->get_application_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_application_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **emoji_id** | **str**| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_application_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_application_role_connections_metadata** +> List[ApplicationRoleConnectionsMetadataItemResponse] get_application_role_connections_metadata(application_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + + try: + api_response = await api_instance.get_application_role_connections_metadata(application_id) + print("The response of DefaultApi->get_application_role_connections_metadata:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_application_role_connections_metadata: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + +### Return type + +[**List[ApplicationRoleConnectionsMetadataItemResponse]**](ApplicationRoleConnectionsMetadataItemResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_application_role_connections_metadata | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_application_user_role_connection** +> ApplicationUserRoleConnectionResponse get_application_user_role_connection(application_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): + +```python +import dc_rest +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + + try: + api_response = await api_instance.get_application_user_role_connection(application_id) + print("The response of DefaultApi->get_application_user_role_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_application_user_role_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + +### Return type + +[**ApplicationUserRoleConnectionResponse**](ApplicationUserRoleConnectionResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_application_user_role_connection | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_auto_moderation_rule** +> CreateAutoModerationRule200Response get_auto_moderation_rule(guild_id, rule_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + rule_id = 'rule_id_example' # str | + + try: + api_response = await api_instance.get_auto_moderation_rule(guild_id, rule_id) + print("The response of DefaultApi->get_auto_moderation_rule:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_auto_moderation_rule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **rule_id** | **str**| | + +### Return type + +[**CreateAutoModerationRule200Response**](CreateAutoModerationRule200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_auto_moderation_rule | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_bot_gateway** +> GatewayBotResponse get_bot_gateway() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.gateway_bot_response import GatewayBotResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_bot_gateway() + print("The response of DefaultApi->get_bot_gateway:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_bot_gateway: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GatewayBotResponse**](GatewayBotResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_bot_gateway | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_channel** +> GetChannel200Response get_channel(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.get_channel(channel_id) + print("The response of DefaultApi->get_channel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_channel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**GetChannel200Response**](GetChannel200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_channel | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entitlement** +> EntitlementResponse get_entitlement(application_id, entitlement_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.entitlement_response import EntitlementResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + entitlement_id = 'entitlement_id_example' # str | + + try: + api_response = await api_instance.get_entitlement(application_id, entitlement_id) + print("The response of DefaultApi->get_entitlement:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_entitlement: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **entitlement_id** | **str**| | + +### Return type + +[**EntitlementResponse**](EntitlementResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_entitlement | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entitlements** +> List[Optional[EntitlementResponse]] get_entitlements(sku_ids, application_id, user_id=user_id, guild_id=guild_id, before=before, after=after, limit=limit, exclude_ended=exclude_ended, exclude_deleted=exclude_deleted, only_active=only_active) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.entitlement_response import EntitlementResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + sku_ids = dc_rest.GetEntitlementsSkuIdsParameter() # GetEntitlementsSkuIdsParameter | + application_id = 'application_id_example' # str | + user_id = 'user_id_example' # str | (optional) + guild_id = 'guild_id_example' # str | (optional) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + exclude_ended = True # bool | (optional) + exclude_deleted = True # bool | (optional) + only_active = True # bool | (optional) + + try: + api_response = await api_instance.get_entitlements(sku_ids, application_id, user_id=user_id, guild_id=guild_id, before=before, after=after, limit=limit, exclude_ended=exclude_ended, exclude_deleted=exclude_deleted, only_active=only_active) + print("The response of DefaultApi->get_entitlements:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_entitlements: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sku_ids** | [**GetEntitlementsSkuIdsParameter**](.md)| | + **application_id** | **str**| | + **user_id** | **str**| | [optional] + **guild_id** | **str**| | [optional] + **before** | **str**| | [optional] + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + **exclude_ended** | **bool**| | [optional] + **exclude_deleted** | **bool**| | [optional] + **only_active** | **bool**| | [optional] + +### Return type + +[**List[Optional[EntitlementResponse]]**](EntitlementResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_entitlements | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_gateway** +> GatewayResponse get_gateway() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.gateway_response import GatewayResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_gateway() + print("The response of DefaultApi->get_gateway:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_gateway: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GatewayResponse**](GatewayResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_gateway | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild** +> GuildWithCountsResponse get_guild(guild_id, with_counts=with_counts) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + with_counts = True # bool | (optional) + + try: + api_response = await api_instance.get_guild(guild_id, with_counts=with_counts) + print("The response of DefaultApi->get_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **with_counts** | **bool**| | [optional] + +### Return type + +[**GuildWithCountsResponse**](GuildWithCountsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_application_command** +> ApplicationCommandResponse get_guild_application_command(application_id, guild_id, command_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + command_id = 'command_id_example' # str | + + try: + api_response = await api_instance.get_guild_application_command(application_id, guild_id, command_id) + print("The response of DefaultApi->get_guild_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **command_id** | **str**| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_application_command_permissions** +> CommandPermissionsResponse get_guild_application_command_permissions(application_id, guild_id, command_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.command_permissions_response import CommandPermissionsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + command_id = 'command_id_example' # str | + + try: + api_response = await api_instance.get_guild_application_command_permissions(application_id, guild_id, command_id) + print("The response of DefaultApi->get_guild_application_command_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_application_command_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **command_id** | **str**| | + +### Return type + +[**CommandPermissionsResponse**](CommandPermissionsResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_application_command_permissions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_ban** +> GuildBanResponse get_guild_ban(guild_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_ban_response import GuildBanResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + + try: + api_response = await api_instance.get_guild_ban(guild_id, user_id) + print("The response of DefaultApi->get_guild_ban:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_ban: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + +### Return type + +[**GuildBanResponse**](GuildBanResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_ban | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_emoji** +> EmojiResponse get_guild_emoji(guild_id, emoji_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + emoji_id = 'emoji_id_example' # str | + + try: + api_response = await api_instance.get_guild_emoji(guild_id, emoji_id) + print("The response of DefaultApi->get_guild_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **emoji_id** | **str**| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_member** +> GuildMemberResponse get_guild_member(guild_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + + try: + api_response = await api_instance.get_guild_member(guild_id, user_id) + print("The response of DefaultApi->get_guild_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + +### Return type + +[**GuildMemberResponse**](GuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_new_member_welcome** +> GuildHomeSettingsResponse get_guild_new_member_welcome(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_new_member_welcome(guild_id) + print("The response of DefaultApi->get_guild_new_member_welcome:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_new_member_welcome: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**GuildHomeSettingsResponse**](GuildHomeSettingsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_new_member_welcome | - | +**204** | 204 response for get_guild_new_member_welcome | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_preview** +> GuildPreviewResponse get_guild_preview(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_preview_response import GuildPreviewResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_preview(guild_id) + print("The response of DefaultApi->get_guild_preview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_preview: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**GuildPreviewResponse**](GuildPreviewResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_preview | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_role** +> GuildRoleResponse get_guild_role(guild_id, role_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + role_id = 'role_id_example' # str | + + try: + api_response = await api_instance.get_guild_role(guild_id, role_id) + print("The response of DefaultApi->get_guild_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **role_id** | **str**| | + +### Return type + +[**GuildRoleResponse**](GuildRoleResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_scheduled_event** +> ListGuildScheduledEvents200ResponseInner get_guild_scheduled_event(guild_id, guild_scheduled_event_id, with_user_count=with_user_count) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + guild_scheduled_event_id = 'guild_scheduled_event_id_example' # str | + with_user_count = True # bool | (optional) + + try: + api_response = await api_instance.get_guild_scheduled_event(guild_id, guild_scheduled_event_id, with_user_count=with_user_count) + print("The response of DefaultApi->get_guild_scheduled_event:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_scheduled_event: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **guild_scheduled_event_id** | **str**| | + **with_user_count** | **bool**| | [optional] + +### Return type + +[**ListGuildScheduledEvents200ResponseInner**](ListGuildScheduledEvents200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_scheduled_event | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_soundboard_sound** +> SoundboardSoundResponse get_guild_soundboard_sound(guild_id, sound_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sound_id = 'sound_id_example' # str | + + try: + api_response = await api_instance.get_guild_soundboard_sound(guild_id, sound_id) + print("The response of DefaultApi->get_guild_soundboard_sound:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_soundboard_sound: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sound_id** | **str**| | + +### Return type + +[**SoundboardSoundResponse**](SoundboardSoundResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_soundboard_sound | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_sticker** +> GuildStickerResponse get_guild_sticker(guild_id, sticker_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sticker_id = 'sticker_id_example' # str | + + try: + api_response = await api_instance.get_guild_sticker(guild_id, sticker_id) + print("The response of DefaultApi->get_guild_sticker:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_sticker: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sticker_id** | **str**| | + +### Return type + +[**GuildStickerResponse**](GuildStickerResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_sticker | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_template** +> GuildTemplateResponse get_guild_template(code) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + code = 'code_example' # str | + + try: + api_response = await api_instance.get_guild_template(code) + print("The response of DefaultApi->get_guild_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| | + +### Return type + +[**GuildTemplateResponse**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_vanity_url** +> VanityURLResponse get_guild_vanity_url(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.vanity_url_response import VanityURLResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_vanity_url(guild_id) + print("The response of DefaultApi->get_guild_vanity_url:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_vanity_url: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**VanityURLResponse**](VanityURLResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_vanity_url | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_webhooks** +> List[ListChannelWebhooks200ResponseInner] get_guild_webhooks(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_webhooks(guild_id) + print("The response of DefaultApi->get_guild_webhooks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_webhooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[ListChannelWebhooks200ResponseInner]**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_webhooks | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_welcome_screen** +> GuildWelcomeScreenResponse get_guild_welcome_screen(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_welcome_screen(guild_id) + print("The response of DefaultApi->get_guild_welcome_screen:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_welcome_screen: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**GuildWelcomeScreenResponse**](GuildWelcomeScreenResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_welcome_screen | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_widget** +> WidgetResponse get_guild_widget(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.widget_response import WidgetResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_widget(guild_id) + print("The response of DefaultApi->get_guild_widget:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_widget: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**WidgetResponse**](WidgetResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_widget | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_widget_png** +> str get_guild_widget_png(guild_id, style=style) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + style = 'style_example' # str | (optional) + + try: + api_response = await api_instance.get_guild_widget_png(guild_id, style=style) + print("The response of DefaultApi->get_guild_widget_png:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_widget_png: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **style** | **str**| | [optional] + +### Return type + +**str** + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: image/png, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_widget_png | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guild_widget_settings** +> WidgetSettingsResponse get_guild_widget_settings(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.widget_settings_response import WidgetSettingsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guild_widget_settings(guild_id) + print("The response of DefaultApi->get_guild_widget_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guild_widget_settings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**WidgetSettingsResponse**](WidgetSettingsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guild_widget_settings | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_guilds_onboarding** +> UserGuildOnboardingResponse get_guilds_onboarding(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_guilds_onboarding(guild_id) + print("The response of DefaultApi->get_guilds_onboarding:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_guilds_onboarding: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**UserGuildOnboardingResponse**](UserGuildOnboardingResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_guilds_onboarding | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_lobby** +> LobbyResponse get_lobby(lobby_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.lobby_response import LobbyResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + + try: + api_response = await api_instance.get_lobby(lobby_id) + print("The response of DefaultApi->get_lobby:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_lobby: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + +### Return type + +[**LobbyResponse**](LobbyResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_lobby | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_lobby_messages** +> List[LobbyMessageResponse] get_lobby_messages(lobby_id, limit=limit) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.lobby_message_response import LobbyMessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + limit = 56 # int | (optional) + + try: + api_response = await api_instance.get_lobby_messages(lobby_id, limit=limit) + print("The response of DefaultApi->get_lobby_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_lobby_messages: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + **limit** | **int**| | [optional] + +### Return type + +[**List[LobbyMessageResponse]**](LobbyMessageResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_lobby_messages | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_message** +> MessageResponse get_message(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + api_response = await api_instance.get_message(channel_id, message_id) + print("The response of DefaultApi->get_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_application** +> PrivateApplicationResponse get_my_application() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_my_application() + print("The response of DefaultApi->get_my_application:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_my_application: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**PrivateApplicationResponse**](PrivateApplicationResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_my_application | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_guild_member** +> PrivateGuildMemberResponse get_my_guild_member(guild_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): + +```python +import dc_rest +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_my_guild_member(guild_id) + print("The response of DefaultApi->get_my_guild_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_my_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**PrivateGuildMemberResponse**](PrivateGuildMemberResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_my_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_oauth2_application** +> PrivateApplicationResponse get_my_oauth2_application() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_my_oauth2_application() + print("The response of DefaultApi->get_my_oauth2_application:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_my_oauth2_application: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**PrivateApplicationResponse**](PrivateApplicationResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_my_oauth2_application | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_oauth2_authorization** +> OAuth2GetAuthorizationResponse get_my_oauth2_authorization() + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_my_oauth2_authorization() + print("The response of DefaultApi->get_my_oauth2_authorization:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_my_oauth2_authorization: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OAuth2GetAuthorizationResponse**](OAuth2GetAuthorizationResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_my_oauth2_authorization | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_my_user** +> UserPIIResponse get_my_user() + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.user_pii_response import UserPIIResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_my_user() + print("The response of DefaultApi->get_my_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_my_user: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserPIIResponse**](UserPIIResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_my_user | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_openid_connect_userinfo** +> OAuth2GetOpenIDConnectUserInfoResponse get_openid_connect_userinfo() + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_openid_connect_userinfo() + print("The response of DefaultApi->get_openid_connect_userinfo:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_openid_connect_userinfo: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OAuth2GetOpenIDConnectUserInfoResponse**](OAuth2GetOpenIDConnectUserInfoResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_openid_connect_userinfo | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_original_webhook_message** +> MessageResponse get_original_webhook_message(webhook_id, webhook_token, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + thread_id = 'thread_id_example' # str | (optional) + + try: + api_response = await api_instance.get_original_webhook_message(webhook_id, webhook_token, thread_id=thread_id) + print("The response of DefaultApi->get_original_webhook_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_original_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **thread_id** | **str**| | [optional] + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_original_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_public_keys** +> OAuth2GetKeys get_public_keys() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_public_keys() + print("The response of DefaultApi->get_public_keys:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_public_keys: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OAuth2GetKeys**](OAuth2GetKeys.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_public_keys | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_self_voice_state** +> VoiceStateResponse get_self_voice_state(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.voice_state_response import VoiceStateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.get_self_voice_state(guild_id) + print("The response of DefaultApi->get_self_voice_state:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_self_voice_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**VoiceStateResponse**](VoiceStateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_self_voice_state | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_soundboard_default_sounds** +> List[SoundboardSoundResponse] get_soundboard_default_sounds() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.get_soundboard_default_sounds() + print("The response of DefaultApi->get_soundboard_default_sounds:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_soundboard_default_sounds: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SoundboardSoundResponse]**](SoundboardSoundResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_soundboard_default_sounds | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_stage_instance** +> StageInstanceResponse get_stage_instance(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.stage_instance_response import StageInstanceResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.get_stage_instance(channel_id) + print("The response of DefaultApi->get_stage_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_stage_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**StageInstanceResponse**](StageInstanceResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_stage_instance | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_sticker** +> GetSticker200Response get_sticker(sticker_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.get_sticker200_response import GetSticker200Response +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + sticker_id = 'sticker_id_example' # str | + + try: + api_response = await api_instance.get_sticker(sticker_id) + print("The response of DefaultApi->get_sticker:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_sticker: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sticker_id** | **str**| | + +### Return type + +[**GetSticker200Response**](GetSticker200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_sticker | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_sticker_pack** +> StickerPackResponse get_sticker_pack(pack_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.sticker_pack_response import StickerPackResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + pack_id = 'pack_id_example' # str | + + try: + api_response = await api_instance.get_sticker_pack(pack_id) + print("The response of DefaultApi->get_sticker_pack:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_sticker_pack: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pack_id** | **str**| | + +### Return type + +[**StickerPackResponse**](StickerPackResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_sticker_pack | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_thread_member** +> ThreadMemberResponse get_thread_member(channel_id, user_id, with_member=with_member) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + user_id = 'user_id_example' # str | + with_member = True # bool | (optional) + + try: + api_response = await api_instance.get_thread_member(channel_id, user_id, with_member=with_member) + print("The response of DefaultApi->get_thread_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_thread_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **user_id** | **str**| | + **with_member** | **bool**| | [optional] + +### Return type + +[**ThreadMemberResponse**](ThreadMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_thread_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user** +> UserResponse get_user(user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.user_response import UserResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + user_id = 'user_id_example' # str | + + try: + api_response = await api_instance.get_user(user_id) + print("The response of DefaultApi->get_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + +### Return type + +[**UserResponse**](UserResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_user | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_voice_state** +> VoiceStateResponse get_voice_state(guild_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.voice_state_response import VoiceStateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + + try: + api_response = await api_instance.get_voice_state(guild_id, user_id) + print("The response of DefaultApi->get_voice_state:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_voice_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + +### Return type + +[**VoiceStateResponse**](VoiceStateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_voice_state | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_webhook** +> ListChannelWebhooks200ResponseInner get_webhook(webhook_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + api_response = await api_instance.get_webhook(webhook_id) + print("The response of DefaultApi->get_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + +### Return type + +[**ListChannelWebhooks200ResponseInner**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_webhook_by_token** +> ListChannelWebhooks200ResponseInner get_webhook_by_token(webhook_id, webhook_token) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + + try: + api_response = await api_instance.get_webhook_by_token(webhook_id, webhook_token) + print("The response of DefaultApi->get_webhook_by_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_webhook_by_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + +### Return type + +[**ListChannelWebhooks200ResponseInner**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_webhook_by_token | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_webhook_message** +> MessageResponse get_webhook_message(webhook_id, webhook_token, message_id, thread_id=thread_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + message_id = 'message_id_example' # str | + thread_id = 'thread_id_example' # str | (optional) + + try: + api_response = await api_instance.get_webhook_message(webhook_id, webhook_token, message_id, thread_id=thread_id) + print("The response of DefaultApi->get_webhook_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **message_id** | **str**| | + **thread_id** | **str**| | [optional] + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for get_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **invite_resolve** +> ListChannelInvites200ResponseInner invite_resolve(code, with_counts=with_counts, guild_scheduled_event_id=guild_scheduled_event_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + code = 'code_example' # str | + with_counts = True # bool | (optional) + guild_scheduled_event_id = 'guild_scheduled_event_id_example' # str | (optional) + + try: + api_response = await api_instance.invite_resolve(code, with_counts=with_counts, guild_scheduled_event_id=guild_scheduled_event_id) + print("The response of DefaultApi->invite_resolve:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->invite_resolve: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| | + **with_counts** | **bool**| | [optional] + **guild_scheduled_event_id** | **str**| | [optional] + +### Return type + +[**ListChannelInvites200ResponseInner**](ListChannelInvites200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for invite_resolve | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **invite_revoke** +> ListChannelInvites200ResponseInner invite_revoke(code) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + code = 'code_example' # str | + + try: + api_response = await api_instance.invite_revoke(code) + print("The response of DefaultApi->invite_revoke:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->invite_revoke: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| | + +### Return type + +[**ListChannelInvites200ResponseInner**](ListChannelInvites200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for invite_revoke | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **join_thread** +> join_thread(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + await api_instance.join_thread(channel_id) + except Exception as e: + print("Exception when calling DefaultApi->join_thread: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for join_thread | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **leave_guild** +> leave_guild(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + await api_instance.leave_guild(guild_id) + except Exception as e: + print("Exception when calling DefaultApi->leave_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for leave_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **leave_lobby** +> leave_lobby(lobby_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + lobby_id = 'lobby_id_example' # str | + + try: + await api_instance.leave_lobby(lobby_id) + except Exception as e: + print("Exception when calling DefaultApi->leave_lobby: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lobby_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for leave_lobby | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **leave_thread** +> leave_thread(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + await api_instance.leave_thread(channel_id) + except Exception as e: + print("Exception when calling DefaultApi->leave_thread: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for leave_thread | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_application_commands** +> List[ApplicationCommandResponse] list_application_commands(application_id, with_localizations=with_localizations) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + with_localizations = True # bool | (optional) + + try: + api_response = await api_instance.list_application_commands(application_id, with_localizations=with_localizations) + print("The response of DefaultApi->list_application_commands:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_application_commands: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **with_localizations** | **bool**| | [optional] + +### Return type + +[**List[ApplicationCommandResponse]**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_application_commands | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_application_emojis** +> ListApplicationEmojisResponse list_application_emojis(application_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + + try: + api_response = await api_instance.list_application_emojis(application_id) + print("The response of DefaultApi->list_application_emojis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_application_emojis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + +### Return type + +[**ListApplicationEmojisResponse**](ListApplicationEmojisResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_application_emojis | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_auto_moderation_rules** +> List[ListAutoModerationRules200ResponseInner] list_auto_moderation_rules(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_auto_moderation_rules(guild_id) + print("The response of DefaultApi->list_auto_moderation_rules:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_auto_moderation_rules: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[ListAutoModerationRules200ResponseInner]**](ListAutoModerationRules200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_auto_moderation_rules | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_channel_invites** +> List[ListChannelInvites200ResponseInner] list_channel_invites(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.list_channel_invites(channel_id) + print("The response of DefaultApi->list_channel_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_channel_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**List[ListChannelInvites200ResponseInner]**](ListChannelInvites200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_channel_invites | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_channel_webhooks** +> List[ListChannelWebhooks200ResponseInner] list_channel_webhooks(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.list_channel_webhooks(channel_id) + print("The response of DefaultApi->list_channel_webhooks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_channel_webhooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +[**List[ListChannelWebhooks200ResponseInner]**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_channel_webhooks | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_application_command_permissions** +> List[CommandPermissionsResponse] list_guild_application_command_permissions(application_id, guild_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.command_permissions_response import CommandPermissionsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_application_command_permissions(application_id, guild_id) + print("The response of DefaultApi->list_guild_application_command_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_application_command_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + +### Return type + +[**List[CommandPermissionsResponse]**](CommandPermissionsResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_application_command_permissions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_application_commands** +> List[ApplicationCommandResponse] list_guild_application_commands(application_id, guild_id, with_localizations=with_localizations) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + with_localizations = True # bool | (optional) + + try: + api_response = await api_instance.list_guild_application_commands(application_id, guild_id, with_localizations=with_localizations) + print("The response of DefaultApi->list_guild_application_commands:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_application_commands: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **with_localizations** | **bool**| | [optional] + +### Return type + +[**List[ApplicationCommandResponse]**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_application_commands | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_audit_log_entries** +> GuildAuditLogResponse list_guild_audit_log_entries(guild_id, user_id=user_id, target_id=target_id, action_type=action_type, before=before, after=after, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | (optional) + target_id = 'target_id_example' # str | (optional) + action_type = 56 # int | (optional) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_guild_audit_log_entries(guild_id, user_id=user_id, target_id=target_id, action_type=action_type, before=before, after=after, limit=limit) + print("The response of DefaultApi->list_guild_audit_log_entries:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_audit_log_entries: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | [optional] + **target_id** | **str**| | [optional] + **action_type** | **int**| | [optional] + **before** | **str**| | [optional] + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**GuildAuditLogResponse**](GuildAuditLogResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_audit_log_entries | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_bans** +> List[GuildBanResponse] list_guild_bans(guild_id, limit=limit, before=before, after=after) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_ban_response import GuildBanResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + limit = 56 # int | (optional) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + + try: + api_response = await api_instance.list_guild_bans(guild_id, limit=limit, before=before, after=after) + print("The response of DefaultApi->list_guild_bans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_bans: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **limit** | **int**| | [optional] + **before** | **str**| | [optional] + **after** | **str**| | [optional] + +### Return type + +[**List[GuildBanResponse]**](GuildBanResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_bans | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_channels** +> List[GetChannel200Response] list_guild_channels(guild_id) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_channels(guild_id) + print("The response of DefaultApi->list_guild_channels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_channels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[GetChannel200Response]**](GetChannel200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_channels | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_emojis** +> List[EmojiResponse] list_guild_emojis(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_emojis(guild_id) + print("The response of DefaultApi->list_guild_emojis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_emojis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[EmojiResponse]**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_emojis | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_integrations** +> List[ListGuildIntegrations200ResponseInner] list_guild_integrations(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_integrations(guild_id) + print("The response of DefaultApi->list_guild_integrations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_integrations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[ListGuildIntegrations200ResponseInner]**](ListGuildIntegrations200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_integrations | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_invites** +> List[ListChannelInvites200ResponseInner] list_guild_invites(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_invites(guild_id) + print("The response of DefaultApi->list_guild_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[ListChannelInvites200ResponseInner]**](ListChannelInvites200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_invites | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_members** +> List[GuildMemberResponse] list_guild_members(guild_id, limit=limit, after=after) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + limit = 56 # int | (optional) + after = 56 # int | (optional) + + try: + api_response = await api_instance.list_guild_members(guild_id, limit=limit, after=after) + print("The response of DefaultApi->list_guild_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **limit** | **int**| | [optional] + **after** | **int**| | [optional] + +### Return type + +[**List[GuildMemberResponse]**](GuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_members | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_roles** +> List[GuildRoleResponse] list_guild_roles(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_roles(guild_id) + print("The response of DefaultApi->list_guild_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_roles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[GuildRoleResponse]**](GuildRoleResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_roles | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_scheduled_event_users** +> List[ScheduledEventUserResponse] list_guild_scheduled_event_users(guild_id, guild_scheduled_event_id, with_member=with_member, limit=limit, before=before, after=after) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + guild_scheduled_event_id = 'guild_scheduled_event_id_example' # str | + with_member = True # bool | (optional) + limit = 56 # int | (optional) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + + try: + api_response = await api_instance.list_guild_scheduled_event_users(guild_id, guild_scheduled_event_id, with_member=with_member, limit=limit, before=before, after=after) + print("The response of DefaultApi->list_guild_scheduled_event_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_scheduled_event_users: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **guild_scheduled_event_id** | **str**| | + **with_member** | **bool**| | [optional] + **limit** | **int**| | [optional] + **before** | **str**| | [optional] + **after** | **str**| | [optional] + +### Return type + +[**List[ScheduledEventUserResponse]**](ScheduledEventUserResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_scheduled_event_users | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_scheduled_events** +> List[ListGuildScheduledEvents200ResponseInner] list_guild_scheduled_events(guild_id, with_user_count=with_user_count) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + with_user_count = True # bool | (optional) + + try: + api_response = await api_instance.list_guild_scheduled_events(guild_id, with_user_count=with_user_count) + print("The response of DefaultApi->list_guild_scheduled_events:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_scheduled_events: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **with_user_count** | **bool**| | [optional] + +### Return type + +[**List[ListGuildScheduledEvents200ResponseInner]**](ListGuildScheduledEvents200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_scheduled_events | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_soundboard_sounds** +> ListGuildSoundboardSoundsResponse list_guild_soundboard_sounds(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_soundboard_sounds(guild_id) + print("The response of DefaultApi->list_guild_soundboard_sounds:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_soundboard_sounds: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**ListGuildSoundboardSoundsResponse**](ListGuildSoundboardSoundsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_soundboard_sounds | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_stickers** +> List[GuildStickerResponse] list_guild_stickers(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_stickers(guild_id) + print("The response of DefaultApi->list_guild_stickers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_stickers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[GuildStickerResponse]**](GuildStickerResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_stickers | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_templates** +> List[GuildTemplateResponse] list_guild_templates(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_templates(guild_id) + print("The response of DefaultApi->list_guild_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_templates: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[GuildTemplateResponse]**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_templates | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_guild_voice_regions** +> List[VoiceRegionResponse] list_guild_voice_regions(guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.voice_region_response import VoiceRegionResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.list_guild_voice_regions(guild_id) + print("The response of DefaultApi->list_guild_voice_regions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_guild_voice_regions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + +### Return type + +[**List[VoiceRegionResponse]**](VoiceRegionResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_guild_voice_regions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_message_reactions_by_emoji** +> List[UserResponse] list_message_reactions_by_emoji(channel_id, message_id, emoji_name, after=after, limit=limit, type=type) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.user_response import UserResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + emoji_name = 'emoji_name_example' # str | + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + type = 56 # int | (optional) + + try: + api_response = await api_instance.list_message_reactions_by_emoji(channel_id, message_id, emoji_name, after=after, limit=limit, type=type) + print("The response of DefaultApi->list_message_reactions_by_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_message_reactions_by_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **emoji_name** | **str**| | + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + **type** | **int**| | [optional] + +### Return type + +[**List[UserResponse]**](UserResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_message_reactions_by_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_messages** +> List[MessageResponse] list_messages(channel_id, around=around, before=before, after=after, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + around = 'around_example' # str | (optional) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_messages(channel_id, around=around, before=before, after=after, limit=limit) + print("The response of DefaultApi->list_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_messages: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **around** | **str**| | [optional] + **before** | **str**| | [optional] + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**List[MessageResponse]**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_messages | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_connections** +> List[ConnectedAccountResponse] list_my_connections() + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.connected_account_response import ConnectedAccountResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.list_my_connections() + print("The response of DefaultApi->list_my_connections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_my_connections: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[ConnectedAccountResponse]**](ConnectedAccountResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_my_connections | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_guilds** +> List[MyGuildResponse] list_my_guilds(before=before, after=after, limit=limit, with_counts=with_counts) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.my_guild_response import MyGuildResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + before = 'before_example' # str | (optional) + after = 'after_example' # str | (optional) + limit = 56 # int | (optional) + with_counts = True # bool | (optional) + + try: + api_response = await api_instance.list_my_guilds(before=before, after=after, limit=limit, with_counts=with_counts) + print("The response of DefaultApi->list_my_guilds:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_my_guilds: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **before** | **str**| | [optional] + **after** | **str**| | [optional] + **limit** | **int**| | [optional] + **with_counts** | **bool**| | [optional] + +### Return type + +[**List[MyGuildResponse]**](MyGuildResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_my_guilds | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_my_private_archived_threads** +> ThreadsResponse list_my_private_archived_threads(channel_id, before=before, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + before = 'before_example' # str | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_my_private_archived_threads(channel_id, before=before, limit=limit) + print("The response of DefaultApi->list_my_private_archived_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_my_private_archived_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **before** | **str**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**ThreadsResponse**](ThreadsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_my_private_archived_threads | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_pins** +> PinnedMessagesResponse list_pins(channel_id, before=before, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + before = '2013-10-20T19:20:30+01:00' # datetime | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_pins(channel_id, before=before, limit=limit) + print("The response of DefaultApi->list_pins:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_pins: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **before** | **datetime**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**PinnedMessagesResponse**](PinnedMessagesResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_pins | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_private_archived_threads** +> ThreadsResponse list_private_archived_threads(channel_id, before=before, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + before = '2013-10-20T19:20:30+01:00' # datetime | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_private_archived_threads(channel_id, before=before, limit=limit) + print("The response of DefaultApi->list_private_archived_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_private_archived_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **before** | **datetime**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**ThreadsResponse**](ThreadsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_private_archived_threads | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_public_archived_threads** +> ThreadsResponse list_public_archived_threads(channel_id, before=before, limit=limit) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.threads_response import ThreadsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + before = '2013-10-20T19:20:30+01:00' # datetime | (optional) + limit = 56 # int | (optional) + + try: + api_response = await api_instance.list_public_archived_threads(channel_id, before=before, limit=limit) + print("The response of DefaultApi->list_public_archived_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_public_archived_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **before** | **datetime**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**ThreadsResponse**](ThreadsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_public_archived_threads | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_sticker_packs** +> StickerPackCollectionResponse list_sticker_packs() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.list_sticker_packs() + print("The response of DefaultApi->list_sticker_packs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_sticker_packs: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**StickerPackCollectionResponse**](StickerPackCollectionResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_sticker_packs | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_thread_members** +> List[ThreadMemberResponse] list_thread_members(channel_id, with_member=with_member, limit=limit, after=after) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.thread_member_response import ThreadMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + with_member = True # bool | (optional) + limit = 56 # int | (optional) + after = 'after_example' # str | (optional) + + try: + api_response = await api_instance.list_thread_members(channel_id, with_member=with_member, limit=limit, after=after) + print("The response of DefaultApi->list_thread_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_thread_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **with_member** | **bool**| | [optional] + **limit** | **int**| | [optional] + **after** | **str**| | [optional] + +### Return type + +[**List[ThreadMemberResponse]**](ThreadMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_thread_members | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_voice_regions** +> List[VoiceRegionResponse] list_voice_regions() + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.voice_region_response import VoiceRegionResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + + try: + api_response = await api_instance.list_voice_regions() + print("The response of DefaultApi->list_voice_regions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_voice_regions: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[VoiceRegionResponse]**](VoiceRegionResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for list_voice_regions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **partner_sdk_token** +> ProvisionalTokenResponse partner_sdk_token(partner_sdk_unmerge_provisional_account_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + partner_sdk_unmerge_provisional_account_request = dc_rest.PartnerSdkUnmergeProvisionalAccountRequest() # PartnerSdkUnmergeProvisionalAccountRequest | + + try: + api_response = await api_instance.partner_sdk_token(partner_sdk_unmerge_provisional_account_request) + print("The response of DefaultApi->partner_sdk_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->partner_sdk_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **partner_sdk_unmerge_provisional_account_request** | [**PartnerSdkUnmergeProvisionalAccountRequest**](PartnerSdkUnmergeProvisionalAccountRequest.md)| | + +### Return type + +[**ProvisionalTokenResponse**](ProvisionalTokenResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for partner_sdk_token | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **partner_sdk_unmerge_provisional_account** +> partner_sdk_unmerge_provisional_account(partner_sdk_unmerge_provisional_account_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + partner_sdk_unmerge_provisional_account_request = dc_rest.PartnerSdkUnmergeProvisionalAccountRequest() # PartnerSdkUnmergeProvisionalAccountRequest | + + try: + await api_instance.partner_sdk_unmerge_provisional_account(partner_sdk_unmerge_provisional_account_request) + except Exception as e: + print("Exception when calling DefaultApi->partner_sdk_unmerge_provisional_account: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **partner_sdk_unmerge_provisional_account_request** | [**PartnerSdkUnmergeProvisionalAccountRequest**](PartnerSdkUnmergeProvisionalAccountRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for partner_sdk_unmerge_provisional_account | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **poll_expire** +> MessageResponse poll_expire(channel_id, message_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + + try: + api_response = await api_instance.poll_expire(channel_id, message_id) + print("The response of DefaultApi->poll_expire:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->poll_expire: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for poll_expire | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **preview_prune_guild** +> GuildPruneResponse preview_prune_guild(guild_id, days=days, include_roles=include_roles) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_prune_response import GuildPruneResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + days = 56 # int | (optional) + include_roles = dc_rest.GetEntitlementsSkuIdsParameter() # GetEntitlementsSkuIdsParameter | (optional) + + try: + api_response = await api_instance.preview_prune_guild(guild_id, days=days, include_roles=include_roles) + print("The response of DefaultApi->preview_prune_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->preview_prune_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **days** | **int**| | [optional] + **include_roles** | [**GetEntitlementsSkuIdsParameter**](.md)| | [optional] + +### Return type + +[**GuildPruneResponse**](GuildPruneResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for preview_prune_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **prune_guild** +> GuildPruneResponse prune_guild(guild_id, prune_guild_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_prune_response import GuildPruneResponse +from dc_rest.models.prune_guild_request import PruneGuildRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + prune_guild_request = dc_rest.PruneGuildRequest() # PruneGuildRequest | + + try: + api_response = await api_instance.prune_guild(guild_id, prune_guild_request) + print("The response of DefaultApi->prune_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->prune_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **prune_guild_request** | [**PruneGuildRequest**](PruneGuildRequest.md)| | + +### Return type + +[**GuildPruneResponse**](GuildPruneResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for prune_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_guilds_onboarding** +> GuildOnboardingResponse put_guilds_onboarding(guild_id, update_guild_onboarding_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + update_guild_onboarding_request = dc_rest.UpdateGuildOnboardingRequest() # UpdateGuildOnboardingRequest | + + try: + api_response = await api_instance.put_guilds_onboarding(guild_id, update_guild_onboarding_request) + print("The response of DefaultApi->put_guilds_onboarding:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->put_guilds_onboarding: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **update_guild_onboarding_request** | [**UpdateGuildOnboardingRequest**](UpdateGuildOnboardingRequest.md)| | + +### Return type + +[**GuildOnboardingResponse**](GuildOnboardingResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for put_guilds_onboarding | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **search_guild_members** +> List[GuildMemberResponse] search_guild_members(limit, query, guild_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + limit = 56 # int | + query = 'query_example' # str | + guild_id = 'guild_id_example' # str | + + try: + api_response = await api_instance.search_guild_members(limit, query, guild_id) + print("The response of DefaultApi->search_guild_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->search_guild_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | + **query** | **str**| | + **guild_id** | **str**| | + +### Return type + +[**List[GuildMemberResponse]**](GuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for search_guild_members | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **send_soundboard_sound** +> send_soundboard_sound(channel_id, soundboard_sound_send_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + soundboard_sound_send_request = dc_rest.SoundboardSoundSendRequest() # SoundboardSoundSendRequest | + + try: + await api_instance.send_soundboard_sound(channel_id, soundboard_sound_send_request) + except Exception as e: + print("Exception when calling DefaultApi->send_soundboard_sound: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **soundboard_sound_send_request** | [**SoundboardSoundSendRequest**](SoundboardSoundSendRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for send_soundboard_sound | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_channel_permission_overwrite** +> set_channel_permission_overwrite(channel_id, overwrite_id, set_channel_permission_overwrite_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + overwrite_id = 'overwrite_id_example' # str | + set_channel_permission_overwrite_request = dc_rest.SetChannelPermissionOverwriteRequest() # SetChannelPermissionOverwriteRequest | + + try: + await api_instance.set_channel_permission_overwrite(channel_id, overwrite_id, set_channel_permission_overwrite_request) + except Exception as e: + print("Exception when calling DefaultApi->set_channel_permission_overwrite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **overwrite_id** | **str**| | + **set_channel_permission_overwrite_request** | [**SetChannelPermissionOverwriteRequest**](SetChannelPermissionOverwriteRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for set_channel_permission_overwrite | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_guild_application_command_permissions** +> CommandPermissionsResponse set_guild_application_command_permissions(application_id, guild_id, command_id, set_guild_application_command_permissions_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.command_permissions_response import CommandPermissionsResponse +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + command_id = 'command_id_example' # str | + set_guild_application_command_permissions_request = dc_rest.SetGuildApplicationCommandPermissionsRequest() # SetGuildApplicationCommandPermissionsRequest | + + try: + api_response = await api_instance.set_guild_application_command_permissions(application_id, guild_id, command_id, set_guild_application_command_permissions_request) + print("The response of DefaultApi->set_guild_application_command_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->set_guild_application_command_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **command_id** | **str**| | + **set_guild_application_command_permissions_request** | [**SetGuildApplicationCommandPermissionsRequest**](SetGuildApplicationCommandPermissionsRequest.md)| | + +### Return type + +[**CommandPermissionsResponse**](CommandPermissionsResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for set_guild_application_command_permissions | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_guild_mfa_level** +> GuildMFALevelResponse set_guild_mfa_level(guild_id, set_guild_mfa_level_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + set_guild_mfa_level_request = dc_rest.SetGuildMfaLevelRequest() # SetGuildMfaLevelRequest | + + try: + api_response = await api_instance.set_guild_mfa_level(guild_id, set_guild_mfa_level_request) + print("The response of DefaultApi->set_guild_mfa_level:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->set_guild_mfa_level: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **set_guild_mfa_level_request** | [**SetGuildMfaLevelRequest**](SetGuildMfaLevelRequest.md)| | + +### Return type + +[**GuildMFALevelResponse**](GuildMFALevelResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for set_guild_mfa_level | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sync_guild_template** +> GuildTemplateResponse sync_guild_template(guild_id, code) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + code = 'code_example' # str | + + try: + api_response = await api_instance.sync_guild_template(guild_id, code) + print("The response of DefaultApi->sync_guild_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->sync_guild_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **code** | **str**| | + +### Return type + +[**GuildTemplateResponse**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for sync_guild_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **thread_search** +> ThreadSearchResponse thread_search(channel_id, name=name, slop=slop, min_id=min_id, max_id=max_id, tag=tag, tag_setting=tag_setting, archived=archived, sort_by=sort_by, sort_order=sort_order, limit=limit, offset=offset) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.thread_search_response import ThreadSearchResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + name = 'name_example' # str | (optional) + slop = 56 # int | (optional) + min_id = 'min_id_example' # str | (optional) + max_id = 'max_id_example' # str | (optional) + tag = dc_rest.ThreadSearchTagParameter() # ThreadSearchTagParameter | (optional) + tag_setting = 'tag_setting_example' # str | (optional) + archived = True # bool | (optional) + sort_by = 'sort_by_example' # str | (optional) + sort_order = 'sort_order_example' # str | (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + + try: + api_response = await api_instance.thread_search(channel_id, name=name, slop=slop, min_id=min_id, max_id=max_id, tag=tag, tag_setting=tag_setting, archived=archived, sort_by=sort_by, sort_order=sort_order, limit=limit, offset=offset) + print("The response of DefaultApi->thread_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->thread_search: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **name** | **str**| | [optional] + **slop** | **int**| | [optional] + **min_id** | **str**| | [optional] + **max_id** | **str**| | [optional] + **tag** | [**ThreadSearchTagParameter**](.md)| | [optional] + **tag_setting** | **str**| | [optional] + **archived** | **bool**| | [optional] + **sort_by** | **str**| | [optional] + **sort_order** | **str**| | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + +### Return type + +[**ThreadSearchResponse**](ThreadSearchResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for thread_search | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **trigger_typing_indicator** +> object trigger_typing_indicator(channel_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + + try: + api_response = await api_instance.trigger_typing_indicator(channel_id) + print("The response of DefaultApi->trigger_typing_indicator:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->trigger_typing_indicator: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + +### Return type + +**object** + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for trigger_typing_indicator | - | +**204** | 204 response for trigger_typing_indicator | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unban_user_from_guild** +> unban_user_from_guild(guild_id, user_id) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + + try: + await api_instance.unban_user_from_guild(guild_id, user_id) + except Exception as e: + print("Exception when calling DefaultApi->unban_user_from_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for unban_user_from_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_application** +> PrivateApplicationResponse update_application(application_id, application_form_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_form_partial import ApplicationFormPartial +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + application_form_partial = dc_rest.ApplicationFormPartial() # ApplicationFormPartial | + + try: + api_response = await api_instance.update_application(application_id, application_form_partial) + print("The response of DefaultApi->update_application:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_application: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **application_form_partial** | [**ApplicationFormPartial**](ApplicationFormPartial.md)| | + +### Return type + +[**PrivateApplicationResponse**](PrivateApplicationResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_application | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_application_command** +> ApplicationCommandResponse update_application_command(application_id, command_id, application_command_patch_request_partial) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + command_id = 'command_id_example' # str | + application_command_patch_request_partial = dc_rest.ApplicationCommandPatchRequestPartial() # ApplicationCommandPatchRequestPartial | + + try: + api_response = await api_instance.update_application_command(application_id, command_id, application_command_patch_request_partial) + print("The response of DefaultApi->update_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **command_id** | **str**| | + **application_command_patch_request_partial** | [**ApplicationCommandPatchRequestPartial**](ApplicationCommandPatchRequestPartial.md)| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_application_emoji** +> EmojiResponse update_application_emoji(application_id, emoji_id, update_application_emoji_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + emoji_id = 'emoji_id_example' # str | + update_application_emoji_request = dc_rest.UpdateApplicationEmojiRequest() # UpdateApplicationEmojiRequest | + + try: + api_response = await api_instance.update_application_emoji(application_id, emoji_id, update_application_emoji_request) + print("The response of DefaultApi->update_application_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_application_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **emoji_id** | **str**| | + **update_application_emoji_request** | [**UpdateApplicationEmojiRequest**](UpdateApplicationEmojiRequest.md)| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_application_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_application_role_connections_metadata** +> List[ApplicationRoleConnectionsMetadataItemResponse] update_application_role_connections_metadata(application_id, application_role_connections_metadata_item_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + application_role_connections_metadata_item_request = [dc_rest.ApplicationRoleConnectionsMetadataItemRequest()] # List[ApplicationRoleConnectionsMetadataItemRequest] | + + try: + api_response = await api_instance.update_application_role_connections_metadata(application_id, application_role_connections_metadata_item_request) + print("The response of DefaultApi->update_application_role_connections_metadata:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_application_role_connections_metadata: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **application_role_connections_metadata_item_request** | [**List[ApplicationRoleConnectionsMetadataItemRequest]**](ApplicationRoleConnectionsMetadataItemRequest.md)| | + +### Return type + +[**List[ApplicationRoleConnectionsMetadataItemResponse]**](ApplicationRoleConnectionsMetadataItemResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_application_role_connections_metadata | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_application_user_role_connection** +> ApplicationUserRoleConnectionResponse update_application_user_role_connection(application_id, update_application_user_role_connection_request) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): + +```python +import dc_rest +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + update_application_user_role_connection_request = dc_rest.UpdateApplicationUserRoleConnectionRequest() # UpdateApplicationUserRoleConnectionRequest | + + try: + api_response = await api_instance.update_application_user_role_connection(application_id, update_application_user_role_connection_request) + print("The response of DefaultApi->update_application_user_role_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_application_user_role_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **update_application_user_role_connection_request** | [**UpdateApplicationUserRoleConnectionRequest**](UpdateApplicationUserRoleConnectionRequest.md)| | + +### Return type + +[**ApplicationUserRoleConnectionResponse**](ApplicationUserRoleConnectionResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_application_user_role_connection | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_auto_moderation_rule** +> CreateAutoModerationRule200Response update_auto_moderation_rule(guild_id, rule_id, update_auto_moderation_rule_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + rule_id = 'rule_id_example' # str | + update_auto_moderation_rule_request = dc_rest.UpdateAutoModerationRuleRequest() # UpdateAutoModerationRuleRequest | + + try: + api_response = await api_instance.update_auto_moderation_rule(guild_id, rule_id, update_auto_moderation_rule_request) + print("The response of DefaultApi->update_auto_moderation_rule:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_auto_moderation_rule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **rule_id** | **str**| | + **update_auto_moderation_rule_request** | [**UpdateAutoModerationRuleRequest**](UpdateAutoModerationRuleRequest.md)| | + +### Return type + +[**CreateAutoModerationRule200Response**](CreateAutoModerationRule200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_auto_moderation_rule | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_channel** +> GetChannel200Response update_channel(channel_id, update_channel_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.get_channel200_response import GetChannel200Response +from dc_rest.models.update_channel_request import UpdateChannelRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + update_channel_request = dc_rest.UpdateChannelRequest() # UpdateChannelRequest | + + try: + api_response = await api_instance.update_channel(channel_id, update_channel_request) + print("The response of DefaultApi->update_channel:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_channel: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **update_channel_request** | [**UpdateChannelRequest**](UpdateChannelRequest.md)| | + +### Return type + +[**GetChannel200Response**](GetChannel200Response.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_channel | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild** +> GuildResponse update_guild(guild_id, guild_patch_request_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial +from dc_rest.models.guild_response import GuildResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + guild_patch_request_partial = dc_rest.GuildPatchRequestPartial() # GuildPatchRequestPartial | + + try: + api_response = await api_instance.update_guild(guild_id, guild_patch_request_partial) + print("The response of DefaultApi->update_guild:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **guild_patch_request_partial** | [**GuildPatchRequestPartial**](GuildPatchRequestPartial.md)| | + +### Return type + +[**GuildResponse**](GuildResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_application_command** +> ApplicationCommandResponse update_guild_application_command(application_id, guild_id, command_id, application_command_patch_request_partial) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial +from dc_rest.models.application_command_response import ApplicationCommandResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + guild_id = 'guild_id_example' # str | + command_id = 'command_id_example' # str | + application_command_patch_request_partial = dc_rest.ApplicationCommandPatchRequestPartial() # ApplicationCommandPatchRequestPartial | + + try: + api_response = await api_instance.update_guild_application_command(application_id, guild_id, command_id, application_command_patch_request_partial) + print("The response of DefaultApi->update_guild_application_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_application_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **guild_id** | **str**| | + **command_id** | **str**| | + **application_command_patch_request_partial** | [**ApplicationCommandPatchRequestPartial**](ApplicationCommandPatchRequestPartial.md)| | + +### Return type + +[**ApplicationCommandResponse**](ApplicationCommandResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_application_command | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_emoji** +> EmojiResponse update_guild_emoji(guild_id, emoji_id, update_guild_emoji_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.emoji_response import EmojiResponse +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + emoji_id = 'emoji_id_example' # str | + update_guild_emoji_request = dc_rest.UpdateGuildEmojiRequest() # UpdateGuildEmojiRequest | + + try: + api_response = await api_instance.update_guild_emoji(guild_id, emoji_id, update_guild_emoji_request) + print("The response of DefaultApi->update_guild_emoji:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_emoji: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **emoji_id** | **str**| | + **update_guild_emoji_request** | [**UpdateGuildEmojiRequest**](UpdateGuildEmojiRequest.md)| | + +### Return type + +[**EmojiResponse**](EmojiResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_emoji | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_member** +> GuildMemberResponse update_guild_member(guild_id, user_id, update_guild_member_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_member_response import GuildMemberResponse +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + update_guild_member_request = dc_rest.UpdateGuildMemberRequest() # UpdateGuildMemberRequest | + + try: + api_response = await api_instance.update_guild_member(guild_id, user_id, update_guild_member_request) + print("The response of DefaultApi->update_guild_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **update_guild_member_request** | [**UpdateGuildMemberRequest**](UpdateGuildMemberRequest.md)| | + +### Return type + +[**GuildMemberResponse**](GuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_member | - | +**204** | 204 response for update_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_role** +> GuildRoleResponse update_guild_role(guild_id, role_id, create_guild_role_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest +from dc_rest.models.guild_role_response import GuildRoleResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + role_id = 'role_id_example' # str | + create_guild_role_request = dc_rest.CreateGuildRoleRequest() # CreateGuildRoleRequest | + + try: + api_response = await api_instance.update_guild_role(guild_id, role_id, create_guild_role_request) + print("The response of DefaultApi->update_guild_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **role_id** | **str**| | + **create_guild_role_request** | [**CreateGuildRoleRequest**](CreateGuildRoleRequest.md)| | + +### Return type + +[**GuildRoleResponse**](GuildRoleResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_role | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_scheduled_event** +> ListGuildScheduledEvents200ResponseInner update_guild_scheduled_event(guild_id, guild_scheduled_event_id, update_guild_scheduled_event_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + guild_scheduled_event_id = 'guild_scheduled_event_id_example' # str | + update_guild_scheduled_event_request = dc_rest.UpdateGuildScheduledEventRequest() # UpdateGuildScheduledEventRequest | + + try: + api_response = await api_instance.update_guild_scheduled_event(guild_id, guild_scheduled_event_id, update_guild_scheduled_event_request) + print("The response of DefaultApi->update_guild_scheduled_event:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_scheduled_event: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **guild_scheduled_event_id** | **str**| | + **update_guild_scheduled_event_request** | [**UpdateGuildScheduledEventRequest**](UpdateGuildScheduledEventRequest.md)| | + +### Return type + +[**ListGuildScheduledEvents200ResponseInner**](ListGuildScheduledEvents200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_scheduled_event | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_soundboard_sound** +> SoundboardSoundResponse update_guild_soundboard_sound(guild_id, sound_id, soundboard_patch_request_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sound_id = 'sound_id_example' # str | + soundboard_patch_request_partial = dc_rest.SoundboardPatchRequestPartial() # SoundboardPatchRequestPartial | + + try: + api_response = await api_instance.update_guild_soundboard_sound(guild_id, sound_id, soundboard_patch_request_partial) + print("The response of DefaultApi->update_guild_soundboard_sound:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_soundboard_sound: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sound_id** | **str**| | + **soundboard_patch_request_partial** | [**SoundboardPatchRequestPartial**](SoundboardPatchRequestPartial.md)| | + +### Return type + +[**SoundboardSoundResponse**](SoundboardSoundResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_soundboard_sound | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_sticker** +> GuildStickerResponse update_guild_sticker(guild_id, sticker_id, update_guild_sticker_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_sticker_response import GuildStickerResponse +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + sticker_id = 'sticker_id_example' # str | + update_guild_sticker_request = dc_rest.UpdateGuildStickerRequest() # UpdateGuildStickerRequest | + + try: + api_response = await api_instance.update_guild_sticker(guild_id, sticker_id, update_guild_sticker_request) + print("The response of DefaultApi->update_guild_sticker:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_sticker: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **sticker_id** | **str**| | + **update_guild_sticker_request** | [**UpdateGuildStickerRequest**](UpdateGuildStickerRequest.md)| | + +### Return type + +[**GuildStickerResponse**](GuildStickerResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_sticker | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_template** +> GuildTemplateResponse update_guild_template(guild_id, code, update_guild_template_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_template_response import GuildTemplateResponse +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + code = 'code_example' # str | + update_guild_template_request = dc_rest.UpdateGuildTemplateRequest() # UpdateGuildTemplateRequest | + + try: + api_response = await api_instance.update_guild_template(guild_id, code, update_guild_template_request) + print("The response of DefaultApi->update_guild_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **code** | **str**| | + **update_guild_template_request** | [**UpdateGuildTemplateRequest**](UpdateGuildTemplateRequest.md)| | + +### Return type + +[**GuildTemplateResponse**](GuildTemplateResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_template | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_welcome_screen** +> GuildWelcomeScreenResponse update_guild_welcome_screen(guild_id, welcome_screen_patch_request_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + welcome_screen_patch_request_partial = dc_rest.WelcomeScreenPatchRequestPartial() # WelcomeScreenPatchRequestPartial | + + try: + api_response = await api_instance.update_guild_welcome_screen(guild_id, welcome_screen_patch_request_partial) + print("The response of DefaultApi->update_guild_welcome_screen:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_welcome_screen: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **welcome_screen_patch_request_partial** | [**WelcomeScreenPatchRequestPartial**](WelcomeScreenPatchRequestPartial.md)| | + +### Return type + +[**GuildWelcomeScreenResponse**](GuildWelcomeScreenResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_welcome_screen | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_guild_widget_settings** +> WidgetSettingsResponse update_guild_widget_settings(guild_id, update_guild_widget_settings_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest +from dc_rest.models.widget_settings_response import WidgetSettingsResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + update_guild_widget_settings_request = dc_rest.UpdateGuildWidgetSettingsRequest() # UpdateGuildWidgetSettingsRequest | + + try: + api_response = await api_instance.update_guild_widget_settings(guild_id, update_guild_widget_settings_request) + print("The response of DefaultApi->update_guild_widget_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_guild_widget_settings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **update_guild_widget_settings_request** | [**UpdateGuildWidgetSettingsRequest**](UpdateGuildWidgetSettingsRequest.md)| | + +### Return type + +[**WidgetSettingsResponse**](WidgetSettingsResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_guild_widget_settings | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_message** +> MessageResponse update_message(channel_id, message_id, message_edit_request_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + message_id = 'message_id_example' # str | + message_edit_request_partial = dc_rest.MessageEditRequestPartial() # MessageEditRequestPartial | + + try: + api_response = await api_instance.update_message(channel_id, message_id, message_edit_request_partial) + print("The response of DefaultApi->update_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **message_id** | **str**| | + **message_edit_request_partial** | [**MessageEditRequestPartial**](MessageEditRequestPartial.md)| | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_my_application** +> PrivateApplicationResponse update_my_application(application_form_partial) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.application_form_partial import ApplicationFormPartial +from dc_rest.models.private_application_response import PrivateApplicationResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_form_partial = dc_rest.ApplicationFormPartial() # ApplicationFormPartial | + + try: + api_response = await api_instance.update_my_application(application_form_partial) + print("The response of DefaultApi->update_my_application:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_my_application: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_form_partial** | [**ApplicationFormPartial**](ApplicationFormPartial.md)| | + +### Return type + +[**PrivateApplicationResponse**](PrivateApplicationResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_my_application | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_my_guild_member** +> PrivateGuildMemberResponse update_my_guild_member(guild_id, update_my_guild_member_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + update_my_guild_member_request = dc_rest.UpdateMyGuildMemberRequest() # UpdateMyGuildMemberRequest | + + try: + api_response = await api_instance.update_my_guild_member(guild_id, update_my_guild_member_request) + print("The response of DefaultApi->update_my_guild_member:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_my_guild_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **update_my_guild_member_request** | [**UpdateMyGuildMemberRequest**](UpdateMyGuildMemberRequest.md)| | + +### Return type + +[**PrivateGuildMemberResponse**](PrivateGuildMemberResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_my_guild_member | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_my_user** +> UserPIIResponse update_my_user(bot_account_patch_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest +from dc_rest.models.user_pii_response import UserPIIResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + bot_account_patch_request = dc_rest.BotAccountPatchRequest() # BotAccountPatchRequest | + + try: + api_response = await api_instance.update_my_user(bot_account_patch_request) + print("The response of DefaultApi->update_my_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_my_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bot_account_patch_request** | [**BotAccountPatchRequest**](BotAccountPatchRequest.md)| | + +### Return type + +[**UserPIIResponse**](UserPIIResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_my_user | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_original_webhook_message** +> MessageResponse update_original_webhook_message(webhook_id, webhook_token, incoming_webhook_update_request_partial, thread_id=thread_id, with_components=with_components) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + incoming_webhook_update_request_partial = dc_rest.IncomingWebhookUpdateRequestPartial() # IncomingWebhookUpdateRequestPartial | + thread_id = 'thread_id_example' # str | (optional) + with_components = True # bool | (optional) + + try: + api_response = await api_instance.update_original_webhook_message(webhook_id, webhook_token, incoming_webhook_update_request_partial, thread_id=thread_id, with_components=with_components) + print("The response of DefaultApi->update_original_webhook_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_original_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **incoming_webhook_update_request_partial** | [**IncomingWebhookUpdateRequestPartial**](IncomingWebhookUpdateRequestPartial.md)| | + **thread_id** | **str**| | [optional] + **with_components** | **bool**| | [optional] + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_original_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_self_voice_state** +> update_self_voice_state(guild_id, update_self_voice_state_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + update_self_voice_state_request = dc_rest.UpdateSelfVoiceStateRequest() # UpdateSelfVoiceStateRequest | + + try: + await api_instance.update_self_voice_state(guild_id, update_self_voice_state_request) + except Exception as e: + print("Exception when calling DefaultApi->update_self_voice_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **update_self_voice_state_request** | [**UpdateSelfVoiceStateRequest**](UpdateSelfVoiceStateRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for update_self_voice_state | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_stage_instance** +> StageInstanceResponse update_stage_instance(channel_id, update_stage_instance_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.stage_instance_response import StageInstanceResponse +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + channel_id = 'channel_id_example' # str | + update_stage_instance_request = dc_rest.UpdateStageInstanceRequest() # UpdateStageInstanceRequest | + + try: + api_response = await api_instance.update_stage_instance(channel_id, update_stage_instance_request) + print("The response of DefaultApi->update_stage_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_stage_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **channel_id** | **str**| | + **update_stage_instance_request** | [**UpdateStageInstanceRequest**](UpdateStageInstanceRequest.md)| | + +### Return type + +[**StageInstanceResponse**](StageInstanceResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_stage_instance | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_voice_state** +> update_voice_state(guild_id, user_id, update_voice_state_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + guild_id = 'guild_id_example' # str | + user_id = 'user_id_example' # str | + update_voice_state_request = dc_rest.UpdateVoiceStateRequest() # UpdateVoiceStateRequest | + + try: + await api_instance.update_voice_state(guild_id, user_id, update_voice_state_request) + except Exception as e: + print("Exception when calling DefaultApi->update_voice_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **guild_id** | **str**| | + **user_id** | **str**| | + **update_voice_state_request** | [**UpdateVoiceStateRequest**](UpdateVoiceStateRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | 204 response for update_voice_state | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_webhook** +> ListChannelWebhooks200ResponseInner update_webhook(webhook_id, update_webhook_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.models.update_webhook_request import UpdateWebhookRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + update_webhook_request = dc_rest.UpdateWebhookRequest() # UpdateWebhookRequest | + + try: + api_response = await api_instance.update_webhook(webhook_id, update_webhook_request) + print("The response of DefaultApi->update_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **update_webhook_request** | [**UpdateWebhookRequest**](UpdateWebhookRequest.md)| | + +### Return type + +[**ListChannelWebhooks200ResponseInner**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_webhook | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_webhook_by_token** +> ListChannelWebhooks200ResponseInner update_webhook_by_token(webhook_id, webhook_token, update_webhook_by_token_request) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + update_webhook_by_token_request = dc_rest.UpdateWebhookByTokenRequest() # UpdateWebhookByTokenRequest | + + try: + api_response = await api_instance.update_webhook_by_token(webhook_id, webhook_token, update_webhook_by_token_request) + print("The response of DefaultApi->update_webhook_by_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_webhook_by_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **update_webhook_by_token_request** | [**UpdateWebhookByTokenRequest**](UpdateWebhookByTokenRequest.md)| | + +### Return type + +[**ListChannelWebhooks200ResponseInner**](ListChannelWebhooks200ResponseInner.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_webhook_by_token | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_webhook_message** +> MessageResponse update_webhook_message(webhook_id, webhook_token, message_id, incoming_webhook_update_request_partial, thread_id=thread_id, with_components=with_components) + +### Example + +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial +from dc_rest.models.message_response import MessageResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + webhook_id = 'webhook_id_example' # str | + webhook_token = 'webhook_token_example' # str | + message_id = 'message_id_example' # str | + incoming_webhook_update_request_partial = dc_rest.IncomingWebhookUpdateRequestPartial() # IncomingWebhookUpdateRequestPartial | + thread_id = 'thread_id_example' # str | (optional) + with_components = True # bool | (optional) + + try: + api_response = await api_instance.update_webhook_message(webhook_id, webhook_token, message_id, incoming_webhook_update_request_partial, thread_id=thread_id, with_components=with_components) + print("The response of DefaultApi->update_webhook_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->update_webhook_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **webhook_token** | **str**| | + **message_id** | **str**| | + **incoming_webhook_update_request_partial** | [**IncomingWebhookUpdateRequestPartial**](IncomingWebhookUpdateRequestPartial.md)| | + **thread_id** | **str**| | [optional] + **with_components** | **bool**| | [optional] + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for update_webhook_message | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **upload_application_attachment** +> ActivitiesAttachmentResponse upload_application_attachment(application_id, file) + +### Example + +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): +* Api Key Authentication (BotToken): + +```python +import dc_rest +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse +from dc_rest.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://discord.com/api/v10 +# See configuration.py for a list of all supported configuration parameters. +configuration = dc_rest.Configuration( + host = "https://discord.com/api/v10" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure API key authorization: BotToken +configuration.api_key['BotToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['BotToken'] = 'Bearer' + +# Enter a context with an instance of the API client +async with dc_rest.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dc_rest.DefaultApi(api_client) + application_id = 'application_id_example' # str | + file = 'file_example' # str | + + try: + api_response = await api_instance.upload_application_attachment(application_id, file) + print("The response of DefaultApi->upload_application_attachment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->upload_application_attachment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **application_id** | **str**| | + **file** | **str**| | + +### Return type + +[**ActivitiesAttachmentResponse**](ActivitiesAttachmentResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2), [BotToken](../README.md#BotToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 200 response for upload_application_attachment | - | +**4XX** | Client error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DefaultKeywordListTriggerMetadata.md b/docs/DefaultKeywordListTriggerMetadata.md new file mode 100644 index 0000000..8692bba --- /dev/null +++ b/docs/DefaultKeywordListTriggerMetadata.md @@ -0,0 +1,30 @@ +# DefaultKeywordListTriggerMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_list** | **List[str]** | | [optional] +**presets** | **List[int]** | | [optional] + +## Example + +```python +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordListTriggerMetadata from a JSON string +default_keyword_list_trigger_metadata_instance = DefaultKeywordListTriggerMetadata.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordListTriggerMetadata.to_json()) + +# convert the object into a dict +default_keyword_list_trigger_metadata_dict = default_keyword_list_trigger_metadata_instance.to_dict() +# create an instance of DefaultKeywordListTriggerMetadata from a dict +default_keyword_list_trigger_metadata_from_dict = DefaultKeywordListTriggerMetadata.from_dict(default_keyword_list_trigger_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordListTriggerMetadataResponse.md b/docs/DefaultKeywordListTriggerMetadataResponse.md new file mode 100644 index 0000000..01719b8 --- /dev/null +++ b/docs/DefaultKeywordListTriggerMetadataResponse.md @@ -0,0 +1,30 @@ +# DefaultKeywordListTriggerMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_list** | **List[str]** | | +**presets** | **List[int]** | | + +## Example + +```python +from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordListTriggerMetadataResponse from a JSON string +default_keyword_list_trigger_metadata_response_instance = DefaultKeywordListTriggerMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordListTriggerMetadataResponse.to_json()) + +# convert the object into a dict +default_keyword_list_trigger_metadata_response_dict = default_keyword_list_trigger_metadata_response_instance.to_dict() +# create an instance of DefaultKeywordListTriggerMetadataResponse from a dict +default_keyword_list_trigger_metadata_response_from_dict = DefaultKeywordListTriggerMetadataResponse.from_dict(default_keyword_list_trigger_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordListUpsertRequest.md b/docs/DefaultKeywordListUpsertRequest.md new file mode 100644 index 0000000..7bda3c0 --- /dev/null +++ b/docs/DefaultKeywordListUpsertRequest.md @@ -0,0 +1,36 @@ +# DefaultKeywordListUpsertRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | +**trigger_metadata** | [**DefaultKeywordListTriggerMetadata**](DefaultKeywordListTriggerMetadata.md) | | + +## Example + +```python +from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordListUpsertRequest from a JSON string +default_keyword_list_upsert_request_instance = DefaultKeywordListUpsertRequest.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordListUpsertRequest.to_json()) + +# convert the object into a dict +default_keyword_list_upsert_request_dict = default_keyword_list_upsert_request_instance.to_dict() +# create an instance of DefaultKeywordListUpsertRequest from a dict +default_keyword_list_upsert_request_from_dict = DefaultKeywordListUpsertRequest.from_dict(default_keyword_list_upsert_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordListUpsertRequestActionsInner.md b/docs/DefaultKeywordListUpsertRequestActionsInner.md new file mode 100644 index 0000000..637fb4b --- /dev/null +++ b/docs/DefaultKeywordListUpsertRequestActionsInner.md @@ -0,0 +1,30 @@ +# DefaultKeywordListUpsertRequestActionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**UserCommunicationDisabledActionMetadata**](UserCommunicationDisabledActionMetadata.md) | | + +## Example + +```python +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordListUpsertRequestActionsInner from a JSON string +default_keyword_list_upsert_request_actions_inner_instance = DefaultKeywordListUpsertRequestActionsInner.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordListUpsertRequestActionsInner.to_json()) + +# convert the object into a dict +default_keyword_list_upsert_request_actions_inner_dict = default_keyword_list_upsert_request_actions_inner_instance.to_dict() +# create an instance of DefaultKeywordListUpsertRequestActionsInner from a dict +default_keyword_list_upsert_request_actions_inner_from_dict = DefaultKeywordListUpsertRequestActionsInner.from_dict(default_keyword_list_upsert_request_actions_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordListUpsertRequestPartial.md b/docs/DefaultKeywordListUpsertRequestPartial.md new file mode 100644 index 0000000..dd92ac3 --- /dev/null +++ b/docs/DefaultKeywordListUpsertRequestPartial.md @@ -0,0 +1,36 @@ +# DefaultKeywordListUpsertRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**event_type** | **int** | | [optional] +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | [optional] +**trigger_metadata** | [**DefaultKeywordListTriggerMetadata**](DefaultKeywordListTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordListUpsertRequestPartial from a JSON string +default_keyword_list_upsert_request_partial_instance = DefaultKeywordListUpsertRequestPartial.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordListUpsertRequestPartial.to_json()) + +# convert the object into a dict +default_keyword_list_upsert_request_partial_dict = default_keyword_list_upsert_request_partial_instance.to_dict() +# create an instance of DefaultKeywordListUpsertRequestPartial from a dict +default_keyword_list_upsert_request_partial_from_dict = DefaultKeywordListUpsertRequestPartial.from_dict(default_keyword_list_upsert_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordRuleResponse.md b/docs/DefaultKeywordRuleResponse.md new file mode 100644 index 0000000..9ce719e --- /dev/null +++ b/docs/DefaultKeywordRuleResponse.md @@ -0,0 +1,39 @@ +# DefaultKeywordRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | [**DefaultKeywordListTriggerMetadataResponse**](DefaultKeywordListTriggerMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordRuleResponse from a JSON string +default_keyword_rule_response_instance = DefaultKeywordRuleResponse.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordRuleResponse.to_json()) + +# convert the object into a dict +default_keyword_rule_response_dict = default_keyword_rule_response_instance.to_dict() +# create an instance of DefaultKeywordRuleResponse from a dict +default_keyword_rule_response_from_dict = DefaultKeywordRuleResponse.from_dict(default_keyword_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultKeywordRuleResponseActionsInner.md b/docs/DefaultKeywordRuleResponseActionsInner.md new file mode 100644 index 0000000..49f04b8 --- /dev/null +++ b/docs/DefaultKeywordRuleResponseActionsInner.md @@ -0,0 +1,30 @@ +# DefaultKeywordRuleResponseActionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**UserCommunicationDisabledActionMetadataResponse**](UserCommunicationDisabledActionMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultKeywordRuleResponseActionsInner from a JSON string +default_keyword_rule_response_actions_inner_instance = DefaultKeywordRuleResponseActionsInner.from_json(json) +# print the JSON string representation of the object +print(DefaultKeywordRuleResponseActionsInner.to_json()) + +# convert the object into a dict +default_keyword_rule_response_actions_inner_dict = default_keyword_rule_response_actions_inner_instance.to_dict() +# create an instance of DefaultKeywordRuleResponseActionsInner from a dict +default_keyword_rule_response_actions_inner_from_dict = DefaultKeywordRuleResponseActionsInner.from_dict(default_keyword_rule_response_actions_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultReactionEmojiResponse.md b/docs/DefaultReactionEmojiResponse.md new file mode 100644 index 0000000..1e3b39f --- /dev/null +++ b/docs/DefaultReactionEmojiResponse.md @@ -0,0 +1,30 @@ +# DefaultReactionEmojiResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultReactionEmojiResponse from a JSON string +default_reaction_emoji_response_instance = DefaultReactionEmojiResponse.from_json(json) +# print the JSON string representation of the object +print(DefaultReactionEmojiResponse.to_json()) + +# convert the object into a dict +default_reaction_emoji_response_dict = default_reaction_emoji_response_instance.to_dict() +# create an instance of DefaultReactionEmojiResponse from a dict +default_reaction_emoji_response_from_dict = DefaultReactionEmojiResponse.from_dict(default_reaction_emoji_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DiscordIntegrationResponse.md b/docs/DiscordIntegrationResponse.md new file mode 100644 index 0000000..48309da --- /dev/null +++ b/docs/DiscordIntegrationResponse.md @@ -0,0 +1,36 @@ +# DiscordIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**enabled** | **bool** | | [optional] +**id** | **str** | | +**application** | [**IntegrationApplicationResponse**](IntegrationApplicationResponse.md) | | +**scopes** | **List[str]** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.discord_integration_response import DiscordIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DiscordIntegrationResponse from a JSON string +discord_integration_response_instance = DiscordIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(DiscordIntegrationResponse.to_json()) + +# convert the object into a dict +discord_integration_response_dict = discord_integration_response_instance.to_dict() +# create an instance of DiscordIntegrationResponse from a dict +discord_integration_response_from_dict = DiscordIntegrationResponse.from_dict(discord_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditLobbyChannelLinkRequest.md b/docs/EditLobbyChannelLinkRequest.md new file mode 100644 index 0000000..e118ae7 --- /dev/null +++ b/docs/EditLobbyChannelLinkRequest.md @@ -0,0 +1,29 @@ +# EditLobbyChannelLinkRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of EditLobbyChannelLinkRequest from a JSON string +edit_lobby_channel_link_request_instance = EditLobbyChannelLinkRequest.from_json(json) +# print the JSON string representation of the object +print(EditLobbyChannelLinkRequest.to_json()) + +# convert the object into a dict +edit_lobby_channel_link_request_dict = edit_lobby_channel_link_request_instance.to_dict() +# create an instance of EditLobbyChannelLinkRequest from a dict +edit_lobby_channel_link_request_from_dict = EditLobbyChannelLinkRequest.from_dict(edit_lobby_channel_link_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmbeddedActivityInstance.md b/docs/EmbeddedActivityInstance.md new file mode 100644 index 0000000..a6645fb --- /dev/null +++ b/docs/EmbeddedActivityInstance.md @@ -0,0 +1,33 @@ +# EmbeddedActivityInstance + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**instance_id** | **str** | | +**launch_id** | **str** | | +**location** | [**EmbeddedActivityInstanceLocation**](EmbeddedActivityInstanceLocation.md) | | [optional] +**users** | **List[str]** | | + +## Example + +```python +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance + +# TODO update the JSON string below +json = "{}" +# create an instance of EmbeddedActivityInstance from a JSON string +embedded_activity_instance_instance = EmbeddedActivityInstance.from_json(json) +# print the JSON string representation of the object +print(EmbeddedActivityInstance.to_json()) + +# convert the object into a dict +embedded_activity_instance_dict = embedded_activity_instance_instance.to_dict() +# create an instance of EmbeddedActivityInstance from a dict +embedded_activity_instance_from_dict = EmbeddedActivityInstance.from_dict(embedded_activity_instance_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmbeddedActivityInstanceLocation.md b/docs/EmbeddedActivityInstanceLocation.md new file mode 100644 index 0000000..042a6b9 --- /dev/null +++ b/docs/EmbeddedActivityInstanceLocation.md @@ -0,0 +1,32 @@ +# EmbeddedActivityInstanceLocation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**kind** | **str** | | +**channel_id** | **str** | | +**guild_id** | **str** | | + +## Example + +```python +from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation + +# TODO update the JSON string below +json = "{}" +# create an instance of EmbeddedActivityInstanceLocation from a JSON string +embedded_activity_instance_location_instance = EmbeddedActivityInstanceLocation.from_json(json) +# print the JSON string representation of the object +print(EmbeddedActivityInstanceLocation.to_json()) + +# convert the object into a dict +embedded_activity_instance_location_dict = embedded_activity_instance_location_instance.to_dict() +# create an instance of EmbeddedActivityInstanceLocation from a dict +embedded_activity_instance_location_from_dict = EmbeddedActivityInstanceLocation.from_dict(embedded_activity_instance_location_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmojiResponse.md b/docs/EmojiResponse.md new file mode 100644 index 0000000..d5eeb3c --- /dev/null +++ b/docs/EmojiResponse.md @@ -0,0 +1,36 @@ +# EmojiResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**roles** | **List[str]** | | +**require_colons** | **bool** | | +**managed** | **bool** | | +**animated** | **bool** | | +**available** | **bool** | | + +## Example + +```python +from dc_rest.models.emoji_response import EmojiResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of EmojiResponse from a JSON string +emoji_response_instance = EmojiResponse.from_json(json) +# print the JSON string representation of the object +print(EmojiResponse.to_json()) + +# convert the object into a dict +emoji_response_dict = emoji_response_instance.to_dict() +# create an instance of EmojiResponse from a dict +emoji_response_from_dict = EmojiResponse.from_dict(emoji_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitlementResponse.md b/docs/EntitlementResponse.md new file mode 100644 index 0000000..48f5c8c --- /dev/null +++ b/docs/EntitlementResponse.md @@ -0,0 +1,40 @@ +# EntitlementResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**sku_id** | **str** | | +**application_id** | **str** | | +**user_id** | **str** | | +**guild_id** | **str** | | [optional] +**deleted** | **bool** | | +**starts_at** | **datetime** | | [optional] +**ends_at** | **datetime** | | [optional] +**type** | **int** | | +**fulfilled_at** | **datetime** | | [optional] +**fulfillment_status** | **int** | | [optional] +**consumed** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.entitlement_response import EntitlementResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of EntitlementResponse from a JSON string +entitlement_response_instance = EntitlementResponse.from_json(json) +# print the JSON string representation of the object +print(EntitlementResponse.to_json()) + +# convert the object into a dict +entitlement_response_dict = entitlement_response_instance.to_dict() +# create an instance of EntitlementResponse from a dict +entitlement_response_from_dict = EntitlementResponse.from_dict(entitlement_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityMetadataExternal.md b/docs/EntityMetadataExternal.md new file mode 100644 index 0000000..48ab92e --- /dev/null +++ b/docs/EntityMetadataExternal.md @@ -0,0 +1,29 @@ +# EntityMetadataExternal + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | | + +## Example + +```python +from dc_rest.models.entity_metadata_external import EntityMetadataExternal + +# TODO update the JSON string below +json = "{}" +# create an instance of EntityMetadataExternal from a JSON string +entity_metadata_external_instance = EntityMetadataExternal.from_json(json) +# print the JSON string representation of the object +print(EntityMetadataExternal.to_json()) + +# convert the object into a dict +entity_metadata_external_dict = entity_metadata_external_instance.to_dict() +# create an instance of EntityMetadataExternal from a dict +entity_metadata_external_from_dict = EntityMetadataExternal.from_dict(entity_metadata_external_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityMetadataExternalResponse.md b/docs/EntityMetadataExternalResponse.md new file mode 100644 index 0000000..6cb6c08 --- /dev/null +++ b/docs/EntityMetadataExternalResponse.md @@ -0,0 +1,29 @@ +# EntityMetadataExternalResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | | + +## Example + +```python +from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of EntityMetadataExternalResponse from a JSON string +entity_metadata_external_response_instance = EntityMetadataExternalResponse.from_json(json) +# print the JSON string representation of the object +print(EntityMetadataExternalResponse.to_json()) + +# convert the object into a dict +entity_metadata_external_response_dict = entity_metadata_external_response_instance.to_dict() +# create an instance of EntityMetadataExternalResponse from a dict +entity_metadata_external_response_from_dict = EntityMetadataExternalResponse.from_dict(entity_metadata_external_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 0000000..177c5c3 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,31 @@ +# Error + +A single error, either for an API response or a specific field. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Discord internal error code. See error code reference | +**message** | **str** | Human-readable error message | + +## Example + +```python +from dc_rest.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ErrorDetails.md b/docs/ErrorDetails.md new file mode 100644 index 0000000..8f059e8 --- /dev/null +++ b/docs/ErrorDetails.md @@ -0,0 +1,29 @@ +# ErrorDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List[Error]**](Error.md) | The list of errors for this field | + +## Example + +```python +from dc_rest.models.error_details import ErrorDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of ErrorDetails from a JSON string +error_details_instance = ErrorDetails.from_json(json) +# print the JSON string representation of the object +print(ErrorDetails.to_json()) + +# convert the object into a dict +error_details_dict = error_details_instance.to_dict() +# create an instance of ErrorDetails from a dict +error_details_from_dict = ErrorDetails.from_dict(error_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 0000000..c5d0cc6 --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,32 @@ +# ErrorResponse + +Errors object returned by the Discord API + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Discord internal error code. See error code reference | +**message** | **str** | Human-readable error message | +**errors** | [**ErrorDetails**](ErrorDetails.md) | | [optional] + +## Example + +```python +from dc_rest.models.error_response import ErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ErrorResponse from a JSON string +error_response_instance = ErrorResponse.from_json(json) +# print the JSON string representation of the object +print(ErrorResponse.to_json()) + +# convert the object into a dict +error_response_dict = error_response_instance.to_dict() +# create an instance of ErrorResponse from a dict +error_response_from_dict = ErrorResponse.from_dict(error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExecuteWebhookRequest.md b/docs/ExecuteWebhookRequest.md new file mode 100644 index 0000000..cf0d46d --- /dev/null +++ b/docs/ExecuteWebhookRequest.md @@ -0,0 +1,40 @@ +# ExecuteWebhookRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**tts** | **bool** | | [optional] +**flags** | **int** | | [optional] +**username** | **str** | | [optional] +**avatar_url** | **str** | | [optional] +**thread_name** | **str** | | [optional] +**applied_tags** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ExecuteWebhookRequest from a JSON string +execute_webhook_request_instance = ExecuteWebhookRequest.from_json(json) +# print the JSON string representation of the object +print(ExecuteWebhookRequest.to_json()) + +# convert the object into a dict +execute_webhook_request_dict = execute_webhook_request_instance.to_dict() +# create an instance of ExecuteWebhookRequest from a dict +execute_webhook_request_from_dict = ExecuteWebhookRequest.from_dict(execute_webhook_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExternalConnectionIntegrationResponse.md b/docs/ExternalConnectionIntegrationResponse.md new file mode 100644 index 0000000..8d7fbbc --- /dev/null +++ b/docs/ExternalConnectionIntegrationResponse.md @@ -0,0 +1,42 @@ +# ExternalConnectionIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**enabled** | **bool** | | [optional] +**id** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | +**revoked** | **bool** | | [optional] +**expire_behavior** | **int** | | [optional] +**expire_grace_period** | **int** | | [optional] +**subscriber_count** | **int** | | [optional] +**synced_at** | **datetime** | | [optional] +**role_id** | **str** | | [optional] +**syncing** | **bool** | | [optional] +**enable_emoticons** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExternalConnectionIntegrationResponse from a JSON string +external_connection_integration_response_instance = ExternalConnectionIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(ExternalConnectionIntegrationResponse.to_json()) + +# convert the object into a dict +external_connection_integration_response_dict = external_connection_integration_response_instance.to_dict() +# create an instance of ExternalConnectionIntegrationResponse from a dict +external_connection_integration_response_from_dict = ExternalConnectionIntegrationResponse.from_dict(external_connection_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExternalScheduledEventCreateRequest.md b/docs/ExternalScheduledEventCreateRequest.md new file mode 100644 index 0000000..2ff5d3e --- /dev/null +++ b/docs/ExternalScheduledEventCreateRequest.md @@ -0,0 +1,37 @@ +# ExternalScheduledEventCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**privacy_level** | **object** | | +**entity_type** | **int** | | +**channel_id** | **str** | | [optional] +**entity_metadata** | [**EntityMetadataExternal**](EntityMetadataExternal.md) | | + +## Example + +```python +from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ExternalScheduledEventCreateRequest from a JSON string +external_scheduled_event_create_request_instance = ExternalScheduledEventCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ExternalScheduledEventCreateRequest.to_json()) + +# convert the object into a dict +external_scheduled_event_create_request_dict = external_scheduled_event_create_request_instance.to_dict() +# create an instance of ExternalScheduledEventCreateRequest from a dict +external_scheduled_event_create_request_from_dict = ExternalScheduledEventCreateRequest.from_dict(external_scheduled_event_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExternalScheduledEventPatchRequestPartial.md b/docs/ExternalScheduledEventPatchRequestPartial.md new file mode 100644 index 0000000..10a2576 --- /dev/null +++ b/docs/ExternalScheduledEventPatchRequestPartial.md @@ -0,0 +1,38 @@ +# ExternalScheduledEventPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | [optional] +**scheduled_end_time** | **datetime** | | [optional] +**entity_type** | **int** | | [optional] +**privacy_level** | **object** | | [optional] +**channel_id** | **str** | | [optional] +**entity_metadata** | [**EntityMetadataExternal**](EntityMetadataExternal.md) | | [optional] + +## Example + +```python +from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of ExternalScheduledEventPatchRequestPartial from a JSON string +external_scheduled_event_patch_request_partial_instance = ExternalScheduledEventPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(ExternalScheduledEventPatchRequestPartial.to_json()) + +# convert the object into a dict +external_scheduled_event_patch_request_partial_dict = external_scheduled_event_patch_request_partial_instance.to_dict() +# create an instance of ExternalScheduledEventPatchRequestPartial from a dict +external_scheduled_event_patch_request_partial_from_dict = ExternalScheduledEventPatchRequestPartial.from_dict(external_scheduled_event_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExternalScheduledEventResponse.md b/docs/ExternalScheduledEventResponse.md new file mode 100644 index 0000000..b2ce93b --- /dev/null +++ b/docs/ExternalScheduledEventResponse.md @@ -0,0 +1,45 @@ +# ExternalScheduledEventResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**creator_id** | **str** | | [optional] +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**status** | **int** | | +**entity_type** | **int** | | +**entity_id** | **str** | | [optional] +**user_count** | **int** | | [optional] +**privacy_level** | **object** | | +**user_rsvp** | [**ScheduledEventUserResponse**](ScheduledEventUserResponse.md) | | [optional] +**entity_metadata** | [**EntityMetadataExternalResponse**](EntityMetadataExternalResponse.md) | | + +## Example + +```python +from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExternalScheduledEventResponse from a JSON string +external_scheduled_event_response_instance = ExternalScheduledEventResponse.from_json(json) +# print the JSON string representation of the object +print(ExternalScheduledEventResponse.to_json()) + +# convert the object into a dict +external_scheduled_event_response_dict = external_scheduled_event_response_instance.to_dict() +# create an instance of ExternalScheduledEventResponse from a dict +external_scheduled_event_response_from_dict = ExternalScheduledEventResponse.from_dict(external_scheduled_event_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileComponentForMessageRequest.md b/docs/FileComponentForMessageRequest.md new file mode 100644 index 0000000..2c7d5f1 --- /dev/null +++ b/docs/FileComponentForMessageRequest.md @@ -0,0 +1,31 @@ +# FileComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**spoiler** | **bool** | | [optional] +**file** | [**UnfurledMediaRequestWithAttachmentReferenceRequired**](UnfurledMediaRequestWithAttachmentReferenceRequired.md) | | + +## Example + +```python +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FileComponentForMessageRequest from a JSON string +file_component_for_message_request_instance = FileComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(FileComponentForMessageRequest.to_json()) + +# convert the object into a dict +file_component_for_message_request_dict = file_component_for_message_request_instance.to_dict() +# create an instance of FileComponentForMessageRequest from a dict +file_component_for_message_request_from_dict = FileComponentForMessageRequest.from_dict(file_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileComponentResponse.md b/docs/FileComponentResponse.md new file mode 100644 index 0000000..719d5f0 --- /dev/null +++ b/docs/FileComponentResponse.md @@ -0,0 +1,34 @@ +# FileComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**file** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**name** | **str** | | [optional] +**size** | **int** | | [optional] +**spoiler** | **bool** | | + +## Example + +```python +from dc_rest.models.file_component_response import FileComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FileComponentResponse from a JSON string +file_component_response_instance = FileComponentResponse.from_json(json) +# print the JSON string representation of the object +print(FileComponentResponse.to_json()) + +# convert the object into a dict +file_component_response_dict = file_component_response_instance.to_dict() +# create an instance of FileComponentResponse from a dict +file_component_response_from_dict = FileComponentResponse.from_dict(file_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlagToChannelAction.md b/docs/FlagToChannelAction.md new file mode 100644 index 0000000..ccb3e6f --- /dev/null +++ b/docs/FlagToChannelAction.md @@ -0,0 +1,30 @@ +# FlagToChannelAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**FlagToChannelActionMetadata**](FlagToChannelActionMetadata.md) | | + +## Example + +```python +from dc_rest.models.flag_to_channel_action import FlagToChannelAction + +# TODO update the JSON string below +json = "{}" +# create an instance of FlagToChannelAction from a JSON string +flag_to_channel_action_instance = FlagToChannelAction.from_json(json) +# print the JSON string representation of the object +print(FlagToChannelAction.to_json()) + +# convert the object into a dict +flag_to_channel_action_dict = flag_to_channel_action_instance.to_dict() +# create an instance of FlagToChannelAction from a dict +flag_to_channel_action_from_dict = FlagToChannelAction.from_dict(flag_to_channel_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlagToChannelActionMetadata.md b/docs/FlagToChannelActionMetadata.md new file mode 100644 index 0000000..ca2df0d --- /dev/null +++ b/docs/FlagToChannelActionMetadata.md @@ -0,0 +1,29 @@ +# FlagToChannelActionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | + +## Example + +```python +from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of FlagToChannelActionMetadata from a JSON string +flag_to_channel_action_metadata_instance = FlagToChannelActionMetadata.from_json(json) +# print the JSON string representation of the object +print(FlagToChannelActionMetadata.to_json()) + +# convert the object into a dict +flag_to_channel_action_metadata_dict = flag_to_channel_action_metadata_instance.to_dict() +# create an instance of FlagToChannelActionMetadata from a dict +flag_to_channel_action_metadata_from_dict = FlagToChannelActionMetadata.from_dict(flag_to_channel_action_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlagToChannelActionMetadataResponse.md b/docs/FlagToChannelActionMetadataResponse.md new file mode 100644 index 0000000..2541ff3 --- /dev/null +++ b/docs/FlagToChannelActionMetadataResponse.md @@ -0,0 +1,29 @@ +# FlagToChannelActionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | + +## Example + +```python +from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlagToChannelActionMetadataResponse from a JSON string +flag_to_channel_action_metadata_response_instance = FlagToChannelActionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(FlagToChannelActionMetadataResponse.to_json()) + +# convert the object into a dict +flag_to_channel_action_metadata_response_dict = flag_to_channel_action_metadata_response_instance.to_dict() +# create an instance of FlagToChannelActionMetadataResponse from a dict +flag_to_channel_action_metadata_response_from_dict = FlagToChannelActionMetadataResponse.from_dict(flag_to_channel_action_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlagToChannelActionResponse.md b/docs/FlagToChannelActionResponse.md new file mode 100644 index 0000000..fa221cb --- /dev/null +++ b/docs/FlagToChannelActionResponse.md @@ -0,0 +1,30 @@ +# FlagToChannelActionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**FlagToChannelActionMetadataResponse**](FlagToChannelActionMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlagToChannelActionResponse from a JSON string +flag_to_channel_action_response_instance = FlagToChannelActionResponse.from_json(json) +# print the JSON string representation of the object +print(FlagToChannelActionResponse.to_json()) + +# convert the object into a dict +flag_to_channel_action_response_dict = flag_to_channel_action_response_instance.to_dict() +# create an instance of FlagToChannelActionResponse from a dict +flag_to_channel_action_response_from_dict = FlagToChannelActionResponse.from_dict(flag_to_channel_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FollowChannelRequest.md b/docs/FollowChannelRequest.md new file mode 100644 index 0000000..2d88b4b --- /dev/null +++ b/docs/FollowChannelRequest.md @@ -0,0 +1,29 @@ +# FollowChannelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_channel_id** | **str** | | + +## Example + +```python +from dc_rest.models.follow_channel_request import FollowChannelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FollowChannelRequest from a JSON string +follow_channel_request_instance = FollowChannelRequest.from_json(json) +# print the JSON string representation of the object +print(FollowChannelRequest.to_json()) + +# convert the object into a dict +follow_channel_request_dict = follow_channel_request_instance.to_dict() +# create an instance of FollowChannelRequest from a dict +follow_channel_request_from_dict = FollowChannelRequest.from_dict(follow_channel_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ForumTagResponse.md b/docs/ForumTagResponse.md new file mode 100644 index 0000000..a817006 --- /dev/null +++ b/docs/ForumTagResponse.md @@ -0,0 +1,33 @@ +# ForumTagResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**moderated** | **bool** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.forum_tag_response import ForumTagResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ForumTagResponse from a JSON string +forum_tag_response_instance = ForumTagResponse.from_json(json) +# print the JSON string representation of the object +print(ForumTagResponse.to_json()) + +# convert the object into a dict +forum_tag_response_dict = forum_tag_response_instance.to_dict() +# create an instance of ForumTagResponse from a dict +forum_tag_response_from_dict = ForumTagResponse.from_dict(forum_tag_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FriendInviteResponse.md b/docs/FriendInviteResponse.md new file mode 100644 index 0000000..b05a1cd --- /dev/null +++ b/docs/FriendInviteResponse.md @@ -0,0 +1,40 @@ +# FriendInviteResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**code** | **str** | | +**inviter** | [**UserResponse**](UserResponse.md) | | [optional] +**max_age** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**expires_at** | **datetime** | | [optional] +**friends_count** | **int** | | [optional] +**channel** | [**InviteChannelResponse**](InviteChannelResponse.md) | | [optional] +**is_contact** | **bool** | | [optional] +**uses** | **int** | | [optional] +**max_uses** | **int** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.friend_invite_response import FriendInviteResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FriendInviteResponse from a JSON string +friend_invite_response_instance = FriendInviteResponse.from_json(json) +# print the JSON string representation of the object +print(FriendInviteResponse.to_json()) + +# convert the object into a dict +friend_invite_response_dict = friend_invite_response_instance.to_dict() +# create an instance of FriendInviteResponse from a dict +friend_invite_response_from_dict = FriendInviteResponse.from_dict(friend_invite_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GatewayBotResponse.md b/docs/GatewayBotResponse.md new file mode 100644 index 0000000..5930061 --- /dev/null +++ b/docs/GatewayBotResponse.md @@ -0,0 +1,31 @@ +# GatewayBotResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | +**session_start_limit** | [**GatewayBotSessionStartLimitResponse**](GatewayBotSessionStartLimitResponse.md) | | +**shards** | **int** | | + +## Example + +```python +from dc_rest.models.gateway_bot_response import GatewayBotResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GatewayBotResponse from a JSON string +gateway_bot_response_instance = GatewayBotResponse.from_json(json) +# print the JSON string representation of the object +print(GatewayBotResponse.to_json()) + +# convert the object into a dict +gateway_bot_response_dict = gateway_bot_response_instance.to_dict() +# create an instance of GatewayBotResponse from a dict +gateway_bot_response_from_dict = GatewayBotResponse.from_dict(gateway_bot_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GatewayBotSessionStartLimitResponse.md b/docs/GatewayBotSessionStartLimitResponse.md new file mode 100644 index 0000000..297fc10 --- /dev/null +++ b/docs/GatewayBotSessionStartLimitResponse.md @@ -0,0 +1,32 @@ +# GatewayBotSessionStartLimitResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_concurrency** | **int** | | +**remaining** | **int** | | +**reset_after** | **int** | | +**total** | **int** | | + +## Example + +```python +from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GatewayBotSessionStartLimitResponse from a JSON string +gateway_bot_session_start_limit_response_instance = GatewayBotSessionStartLimitResponse.from_json(json) +# print the JSON string representation of the object +print(GatewayBotSessionStartLimitResponse.to_json()) + +# convert the object into a dict +gateway_bot_session_start_limit_response_dict = gateway_bot_session_start_limit_response_instance.to_dict() +# create an instance of GatewayBotSessionStartLimitResponse from a dict +gateway_bot_session_start_limit_response_from_dict = GatewayBotSessionStartLimitResponse.from_dict(gateway_bot_session_start_limit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GatewayResponse.md b/docs/GatewayResponse.md new file mode 100644 index 0000000..f653d71 --- /dev/null +++ b/docs/GatewayResponse.md @@ -0,0 +1,29 @@ +# GatewayResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | + +## Example + +```python +from dc_rest.models.gateway_response import GatewayResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GatewayResponse from a JSON string +gateway_response_instance = GatewayResponse.from_json(json) +# print the JSON string representation of the object +print(GatewayResponse.to_json()) + +# convert the object into a dict +gateway_response_dict = gateway_response_instance.to_dict() +# create an instance of GatewayResponse from a dict +gateway_response_from_dict = GatewayResponse.from_dict(gateway_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetChannel200Response.md b/docs/GetChannel200Response.md new file mode 100644 index 0000000..6bb24a4 --- /dev/null +++ b/docs/GetChannel200Response.md @@ -0,0 +1,66 @@ +# GetChannel200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**guild_id** | **str** | | +**name** | **str** | | +**parent_id** | **str** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**permissions** | **str** | | [optional] +**topic** | **str** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**position** | **int** | | +**permission_overwrites** | [**List[ChannelPermissionOverwriteResponse]**](ChannelPermissionOverwriteResponse.md) | | [optional] +**nsfw** | **bool** | | [optional] +**available_tags** | [**List[ForumTagResponse]**](ForumTagResponse.md) | | [optional] +**default_reaction_emoji** | [**DefaultReactionEmojiResponse**](DefaultReactionEmojiResponse.md) | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**hd_streaming_until** | **datetime** | | [optional] +**hd_streaming_buyer_id** | **str** | | [optional] +**recipients** | [**List[UserResponse]**](UserResponse.md) | | +**icon** | **str** | | [optional] +**owner_id** | **str** | | +**managed** | **bool** | | [optional] +**application_id** | **str** | | [optional] +**thread_metadata** | [**ThreadMetadataResponse**](ThreadMetadataResponse.md) | | [optional] +**message_count** | **int** | | +**member_count** | **int** | | +**total_message_sent** | **int** | | +**applied_tags** | **List[str]** | | [optional] +**member** | [**ThreadMemberResponse**](ThreadMemberResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.get_channel200_response import GetChannel200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetChannel200Response from a JSON string +get_channel200_response_instance = GetChannel200Response.from_json(json) +# print the JSON string representation of the object +print(GetChannel200Response.to_json()) + +# convert the object into a dict +get_channel200_response_dict = get_channel200_response_instance.to_dict() +# create an instance of GetChannel200Response from a dict +get_channel200_response_from_dict = GetChannel200Response.from_dict(get_channel200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetEntitlementsSkuIdsParameter.md b/docs/GetEntitlementsSkuIdsParameter.md new file mode 100644 index 0000000..e6ffeed --- /dev/null +++ b/docs/GetEntitlementsSkuIdsParameter.md @@ -0,0 +1,28 @@ +# GetEntitlementsSkuIdsParameter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEntitlementsSkuIdsParameter from a JSON string +get_entitlements_sku_ids_parameter_instance = GetEntitlementsSkuIdsParameter.from_json(json) +# print the JSON string representation of the object +print(GetEntitlementsSkuIdsParameter.to_json()) + +# convert the object into a dict +get_entitlements_sku_ids_parameter_dict = get_entitlements_sku_ids_parameter_instance.to_dict() +# create an instance of GetEntitlementsSkuIdsParameter from a dict +get_entitlements_sku_ids_parameter_from_dict = GetEntitlementsSkuIdsParameter.from_dict(get_entitlements_sku_ids_parameter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetSticker200Response.md b/docs/GetSticker200Response.md new file mode 100644 index 0000000..953f89c --- /dev/null +++ b/docs/GetSticker200Response.md @@ -0,0 +1,39 @@ +# GetSticker200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**tags** | **str** | | +**type** | **int** | | +**format_type** | **int** | | [optional] +**description** | **str** | | [optional] +**available** | **bool** | | +**guild_id** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**pack_id** | **str** | | +**sort_value** | **int** | | + +## Example + +```python +from dc_rest.models.get_sticker200_response import GetSticker200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSticker200Response from a JSON string +get_sticker200_response_instance = GetSticker200Response.from_json(json) +# print the JSON string representation of the object +print(GetSticker200Response.to_json()) + +# convert the object into a dict +get_sticker200_response_dict = get_sticker200_response_instance.to_dict() +# create an instance of GetSticker200Response from a dict +get_sticker200_response_from_dict = GetSticker200Response.from_dict(get_sticker200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubAuthor.md b/docs/GithubAuthor.md new file mode 100644 index 0000000..3a249d2 --- /dev/null +++ b/docs/GithubAuthor.md @@ -0,0 +1,30 @@ +# GithubAuthor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from dc_rest.models.github_author import GithubAuthor + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubAuthor from a JSON string +github_author_instance = GithubAuthor.from_json(json) +# print the JSON string representation of the object +print(GithubAuthor.to_json()) + +# convert the object into a dict +github_author_dict = github_author_instance.to_dict() +# create an instance of GithubAuthor from a dict +github_author_from_dict = GithubAuthor.from_dict(github_author_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCheckApp.md b/docs/GithubCheckApp.md new file mode 100644 index 0000000..eec679b --- /dev/null +++ b/docs/GithubCheckApp.md @@ -0,0 +1,29 @@ +# GithubCheckApp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from dc_rest.models.github_check_app import GithubCheckApp + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCheckApp from a JSON string +github_check_app_instance = GithubCheckApp.from_json(json) +# print the JSON string representation of the object +print(GithubCheckApp.to_json()) + +# convert the object into a dict +github_check_app_dict = github_check_app_instance.to_dict() +# create an instance of GithubCheckApp from a dict +github_check_app_from_dict = GithubCheckApp.from_dict(github_check_app_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCheckPullRequest.md b/docs/GithubCheckPullRequest.md new file mode 100644 index 0000000..5b26b0f --- /dev/null +++ b/docs/GithubCheckPullRequest.md @@ -0,0 +1,29 @@ +# GithubCheckPullRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **int** | | + +## Example + +```python +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCheckPullRequest from a JSON string +github_check_pull_request_instance = GithubCheckPullRequest.from_json(json) +# print the JSON string representation of the object +print(GithubCheckPullRequest.to_json()) + +# convert the object into a dict +github_check_pull_request_dict = github_check_pull_request_instance.to_dict() +# create an instance of GithubCheckPullRequest from a dict +github_check_pull_request_from_dict = GithubCheckPullRequest.from_dict(github_check_pull_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCheckRun.md b/docs/GithubCheckRun.md new file mode 100644 index 0000000..a0bca84 --- /dev/null +++ b/docs/GithubCheckRun.md @@ -0,0 +1,35 @@ +# GithubCheckRun + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conclusion** | **str** | | [optional] +**name** | **str** | | +**html_url** | **str** | | +**check_suite** | [**GithubCheckSuite**](GithubCheckSuite.md) | | +**details_url** | **str** | | [optional] +**output** | [**GithubCheckRunOutput**](GithubCheckRunOutput.md) | | [optional] +**pull_requests** | [**List[GithubCheckPullRequest]**](GithubCheckPullRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.github_check_run import GithubCheckRun + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCheckRun from a JSON string +github_check_run_instance = GithubCheckRun.from_json(json) +# print the JSON string representation of the object +print(GithubCheckRun.to_json()) + +# convert the object into a dict +github_check_run_dict = github_check_run_instance.to_dict() +# create an instance of GithubCheckRun from a dict +github_check_run_from_dict = GithubCheckRun.from_dict(github_check_run_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCheckRunOutput.md b/docs/GithubCheckRunOutput.md new file mode 100644 index 0000000..68f2e8f --- /dev/null +++ b/docs/GithubCheckRunOutput.md @@ -0,0 +1,30 @@ +# GithubCheckRunOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**summary** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.github_check_run_output import GithubCheckRunOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCheckRunOutput from a JSON string +github_check_run_output_instance = GithubCheckRunOutput.from_json(json) +# print the JSON string representation of the object +print(GithubCheckRunOutput.to_json()) + +# convert the object into a dict +github_check_run_output_dict = github_check_run_output_instance.to_dict() +# create an instance of GithubCheckRunOutput from a dict +github_check_run_output_from_dict = GithubCheckRunOutput.from_dict(github_check_run_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCheckSuite.md b/docs/GithubCheckSuite.md new file mode 100644 index 0000000..e94271f --- /dev/null +++ b/docs/GithubCheckSuite.md @@ -0,0 +1,33 @@ +# GithubCheckSuite + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conclusion** | **str** | | [optional] +**head_branch** | **str** | | [optional] +**head_sha** | **str** | | +**pull_requests** | [**List[GithubCheckPullRequest]**](GithubCheckPullRequest.md) | | [optional] +**app** | [**GithubCheckApp**](GithubCheckApp.md) | | + +## Example + +```python +from dc_rest.models.github_check_suite import GithubCheckSuite + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCheckSuite from a JSON string +github_check_suite_instance = GithubCheckSuite.from_json(json) +# print the JSON string representation of the object +print(GithubCheckSuite.to_json()) + +# convert the object into a dict +github_check_suite_dict = github_check_suite_instance.to_dict() +# create an instance of GithubCheckSuite from a dict +github_check_suite_from_dict = GithubCheckSuite.from_dict(github_check_suite_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubComment.md b/docs/GithubComment.md new file mode 100644 index 0000000..3a218bc --- /dev/null +++ b/docs/GithubComment.md @@ -0,0 +1,33 @@ +# GithubComment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**html_url** | **str** | | +**user** | [**GithubUser**](GithubUser.md) | | +**commit_id** | **str** | | [optional] +**body** | **str** | | + +## Example + +```python +from dc_rest.models.github_comment import GithubComment + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubComment from a JSON string +github_comment_instance = GithubComment.from_json(json) +# print the JSON string representation of the object +print(GithubComment.to_json()) + +# convert the object into a dict +github_comment_dict = github_comment_instance.to_dict() +# create an instance of GithubComment from a dict +github_comment_from_dict = GithubComment.from_dict(github_comment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubCommit.md b/docs/GithubCommit.md new file mode 100644 index 0000000..9df8153 --- /dev/null +++ b/docs/GithubCommit.md @@ -0,0 +1,32 @@ +# GithubCommit + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**url** | **str** | | +**message** | **str** | | +**author** | [**GithubAuthor**](GithubAuthor.md) | | + +## Example + +```python +from dc_rest.models.github_commit import GithubCommit + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubCommit from a JSON string +github_commit_instance = GithubCommit.from_json(json) +# print the JSON string representation of the object +print(GithubCommit.to_json()) + +# convert the object into a dict +github_commit_dict = github_commit_instance.to_dict() +# create an instance of GithubCommit from a dict +github_commit_from_dict = GithubCommit.from_dict(github_commit_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubDiscussion.md b/docs/GithubDiscussion.md new file mode 100644 index 0000000..06d48d8 --- /dev/null +++ b/docs/GithubDiscussion.md @@ -0,0 +1,34 @@ +# GithubDiscussion + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | +**number** | **int** | | +**html_url** | **str** | | +**answer_html_url** | **str** | | [optional] +**body** | **str** | | [optional] +**user** | [**GithubUser**](GithubUser.md) | | + +## Example + +```python +from dc_rest.models.github_discussion import GithubDiscussion + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubDiscussion from a JSON string +github_discussion_instance = GithubDiscussion.from_json(json) +# print the JSON string representation of the object +print(GithubDiscussion.to_json()) + +# convert the object into a dict +github_discussion_dict = github_discussion_instance.to_dict() +# create an instance of GithubDiscussion from a dict +github_discussion_from_dict = GithubDiscussion.from_dict(github_discussion_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubIssue.md b/docs/GithubIssue.md new file mode 100644 index 0000000..4ec523a --- /dev/null +++ b/docs/GithubIssue.md @@ -0,0 +1,35 @@ +# GithubIssue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**number** | **int** | | +**html_url** | **str** | | +**user** | [**GithubUser**](GithubUser.md) | | +**title** | **str** | | +**body** | **str** | | [optional] +**pull_request** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.github_issue import GithubIssue + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubIssue from a JSON string +github_issue_instance = GithubIssue.from_json(json) +# print the JSON string representation of the object +print(GithubIssue.to_json()) + +# convert the object into a dict +github_issue_dict = github_issue_instance.to_dict() +# create an instance of GithubIssue from a dict +github_issue_from_dict = GithubIssue.from_dict(github_issue_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubRelease.md b/docs/GithubRelease.md new file mode 100644 index 0000000..76447af --- /dev/null +++ b/docs/GithubRelease.md @@ -0,0 +1,32 @@ +# GithubRelease + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**tag_name** | **str** | | +**html_url** | **str** | | +**author** | [**GithubUser**](GithubUser.md) | | + +## Example + +```python +from dc_rest.models.github_release import GithubRelease + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubRelease from a JSON string +github_release_instance = GithubRelease.from_json(json) +# print the JSON string representation of the object +print(GithubRelease.to_json()) + +# convert the object into a dict +github_release_dict = github_release_instance.to_dict() +# create an instance of GithubRelease from a dict +github_release_from_dict = GithubRelease.from_dict(github_release_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubRepository.md b/docs/GithubRepository.md new file mode 100644 index 0000000..efd54c4 --- /dev/null +++ b/docs/GithubRepository.md @@ -0,0 +1,32 @@ +# GithubRepository + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**html_url** | **str** | | +**name** | **str** | | +**full_name** | **str** | | + +## Example + +```python +from dc_rest.models.github_repository import GithubRepository + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubRepository from a JSON string +github_repository_instance = GithubRepository.from_json(json) +# print the JSON string representation of the object +print(GithubRepository.to_json()) + +# convert the object into a dict +github_repository_dict = github_repository_instance.to_dict() +# create an instance of GithubRepository from a dict +github_repository_from_dict = GithubRepository.from_dict(github_repository_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubReview.md b/docs/GithubReview.md new file mode 100644 index 0000000..b305e0b --- /dev/null +++ b/docs/GithubReview.md @@ -0,0 +1,32 @@ +# GithubReview + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**GithubUser**](GithubUser.md) | | +**body** | **str** | | [optional] +**html_url** | **str** | | +**state** | **str** | | + +## Example + +```python +from dc_rest.models.github_review import GithubReview + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubReview from a JSON string +github_review_instance = GithubReview.from_json(json) +# print the JSON string representation of the object +print(GithubReview.to_json()) + +# convert the object into a dict +github_review_dict = github_review_instance.to_dict() +# create an instance of GithubReview from a dict +github_review_from_dict = GithubReview.from_dict(github_review_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubUser.md b/docs/GithubUser.md new file mode 100644 index 0000000..5bc36fb --- /dev/null +++ b/docs/GithubUser.md @@ -0,0 +1,32 @@ +# GithubUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**login** | **str** | | +**html_url** | **str** | | +**avatar_url** | **str** | | + +## Example + +```python +from dc_rest.models.github_user import GithubUser + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubUser from a JSON string +github_user_instance = GithubUser.from_json(json) +# print the JSON string representation of the object +print(GithubUser.to_json()) + +# convert the object into a dict +github_user_dict = github_user_instance.to_dict() +# create an instance of GithubUser from a dict +github_user_from_dict = GithubUser.from_dict(github_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GithubWebhook.md b/docs/GithubWebhook.md new file mode 100644 index 0000000..bc4ee94 --- /dev/null +++ b/docs/GithubWebhook.md @@ -0,0 +1,48 @@ +# GithubWebhook + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | | [optional] +**ref** | **str** | | [optional] +**ref_type** | **str** | | [optional] +**comment** | [**GithubComment**](GithubComment.md) | | [optional] +**issue** | [**GithubIssue**](GithubIssue.md) | | [optional] +**pull_request** | [**GithubIssue**](GithubIssue.md) | | [optional] +**repository** | [**GithubRepository**](GithubRepository.md) | | [optional] +**forkee** | [**GithubRepository**](GithubRepository.md) | | [optional] +**sender** | [**GithubUser**](GithubUser.md) | | +**member** | [**GithubUser**](GithubUser.md) | | [optional] +**release** | [**GithubRelease**](GithubRelease.md) | | [optional] +**head_commit** | [**GithubCommit**](GithubCommit.md) | | [optional] +**commits** | [**List[GithubCommit]**](GithubCommit.md) | | [optional] +**forced** | **bool** | | [optional] +**compare** | **str** | | [optional] +**review** | [**GithubReview**](GithubReview.md) | | [optional] +**check_run** | [**GithubCheckRun**](GithubCheckRun.md) | | [optional] +**check_suite** | [**GithubCheckSuite**](GithubCheckSuite.md) | | [optional] +**discussion** | [**GithubDiscussion**](GithubDiscussion.md) | | [optional] +**answer** | [**GithubComment**](GithubComment.md) | | [optional] + +## Example + +```python +from dc_rest.models.github_webhook import GithubWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of GithubWebhook from a JSON string +github_webhook_instance = GithubWebhook.from_json(json) +# print the JSON string representation of the object +print(GithubWebhook.to_json()) + +# convert the object into a dict +github_webhook_dict = github_webhook_instance.to_dict() +# create an instance of GithubWebhook from a dict +github_webhook_from_dict = GithubWebhook.from_dict(github_webhook_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupDMInviteResponse.md b/docs/GroupDMInviteResponse.md new file mode 100644 index 0000000..fd4bd29 --- /dev/null +++ b/docs/GroupDMInviteResponse.md @@ -0,0 +1,36 @@ +# GroupDMInviteResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**code** | **str** | | +**inviter** | [**UserResponse**](UserResponse.md) | | [optional] +**max_age** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**expires_at** | **datetime** | | [optional] +**channel** | [**InviteChannelResponse**](InviteChannelResponse.md) | | [optional] +**approximate_member_count** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupDMInviteResponse from a JSON string +group_dm_invite_response_instance = GroupDMInviteResponse.from_json(json) +# print the JSON string representation of the object +print(GroupDMInviteResponse.to_json()) + +# convert the object into a dict +group_dm_invite_response_dict = group_dm_invite_response_instance.to_dict() +# create an instance of GroupDMInviteResponse from a dict +group_dm_invite_response_from_dict = GroupDMInviteResponse.from_dict(group_dm_invite_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildAuditLogResponse.md b/docs/GuildAuditLogResponse.md new file mode 100644 index 0000000..fa2ca9c --- /dev/null +++ b/docs/GuildAuditLogResponse.md @@ -0,0 +1,36 @@ +# GuildAuditLogResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audit_log_entries** | [**List[AuditLogEntryResponse]**](AuditLogEntryResponse.md) | | +**users** | [**List[UserResponse]**](UserResponse.md) | | +**integrations** | [**List[GuildAuditLogResponseIntegrationsInner]**](GuildAuditLogResponseIntegrationsInner.md) | | +**webhooks** | [**List[ListChannelWebhooks200ResponseInner]**](ListChannelWebhooks200ResponseInner.md) | | +**guild_scheduled_events** | [**List[ListGuildScheduledEvents200ResponseInner]**](ListGuildScheduledEvents200ResponseInner.md) | | +**threads** | [**List[ThreadResponse]**](ThreadResponse.md) | | +**application_commands** | [**List[ApplicationCommandResponse]**](ApplicationCommandResponse.md) | | +**auto_moderation_rules** | [**List[ListAutoModerationRules200ResponseInner]**](ListAutoModerationRules200ResponseInner.md) | | + +## Example + +```python +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildAuditLogResponse from a JSON string +guild_audit_log_response_instance = GuildAuditLogResponse.from_json(json) +# print the JSON string representation of the object +print(GuildAuditLogResponse.to_json()) + +# convert the object into a dict +guild_audit_log_response_dict = guild_audit_log_response_instance.to_dict() +# create an instance of GuildAuditLogResponse from a dict +guild_audit_log_response_from_dict = GuildAuditLogResponse.from_dict(guild_audit_log_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildAuditLogResponseIntegrationsInner.md b/docs/GuildAuditLogResponseIntegrationsInner.md new file mode 100644 index 0000000..aaee2d8 --- /dev/null +++ b/docs/GuildAuditLogResponseIntegrationsInner.md @@ -0,0 +1,33 @@ +# GuildAuditLogResponseIntegrationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**application_id** | **str** | | + +## Example + +```python +from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildAuditLogResponseIntegrationsInner from a JSON string +guild_audit_log_response_integrations_inner_instance = GuildAuditLogResponseIntegrationsInner.from_json(json) +# print the JSON string representation of the object +print(GuildAuditLogResponseIntegrationsInner.to_json()) + +# convert the object into a dict +guild_audit_log_response_integrations_inner_dict = guild_audit_log_response_integrations_inner_instance.to_dict() +# create an instance of GuildAuditLogResponseIntegrationsInner from a dict +guild_audit_log_response_integrations_inner_from_dict = GuildAuditLogResponseIntegrationsInner.from_dict(guild_audit_log_response_integrations_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildBanResponse.md b/docs/GuildBanResponse.md new file mode 100644 index 0000000..4716b67 --- /dev/null +++ b/docs/GuildBanResponse.md @@ -0,0 +1,30 @@ +# GuildBanResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**UserResponse**](UserResponse.md) | | +**reason** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_ban_response import GuildBanResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildBanResponse from a JSON string +guild_ban_response_instance = GuildBanResponse.from_json(json) +# print the JSON string representation of the object +print(GuildBanResponse.to_json()) + +# convert the object into a dict +guild_ban_response_dict = guild_ban_response_instance.to_dict() +# create an instance of GuildBanResponse from a dict +guild_ban_response_from_dict = GuildBanResponse.from_dict(guild_ban_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildChannelLocation.md b/docs/GuildChannelLocation.md new file mode 100644 index 0000000..55ea128 --- /dev/null +++ b/docs/GuildChannelLocation.md @@ -0,0 +1,32 @@ +# GuildChannelLocation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**kind** | **str** | | +**channel_id** | **str** | | +**guild_id** | **str** | | + +## Example + +```python +from dc_rest.models.guild_channel_location import GuildChannelLocation + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildChannelLocation from a JSON string +guild_channel_location_instance = GuildChannelLocation.from_json(json) +# print the JSON string representation of the object +print(GuildChannelLocation.to_json()) + +# convert the object into a dict +guild_channel_location_dict = guild_channel_location_instance.to_dict() +# create an instance of GuildChannelLocation from a dict +guild_channel_location_from_dict = GuildChannelLocation.from_dict(guild_channel_location_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildChannelResponse.md b/docs/GuildChannelResponse.md new file mode 100644 index 0000000..0e0e54f --- /dev/null +++ b/docs/GuildChannelResponse.md @@ -0,0 +1,55 @@ +# GuildChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**guild_id** | **str** | | +**name** | **str** | | +**parent_id** | **str** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**permissions** | **str** | | [optional] +**topic** | **str** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**position** | **int** | | +**permission_overwrites** | [**List[ChannelPermissionOverwriteResponse]**](ChannelPermissionOverwriteResponse.md) | | [optional] +**nsfw** | **bool** | | [optional] +**available_tags** | [**List[ForumTagResponse]**](ForumTagResponse.md) | | [optional] +**default_reaction_emoji** | [**DefaultReactionEmojiResponse**](DefaultReactionEmojiResponse.md) | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**hd_streaming_until** | **datetime** | | [optional] +**hd_streaming_buyer_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_channel_response import GuildChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildChannelResponse from a JSON string +guild_channel_response_instance = GuildChannelResponse.from_json(json) +# print the JSON string representation of the object +print(GuildChannelResponse.to_json()) + +# convert the object into a dict +guild_channel_response_dict = guild_channel_response_instance.to_dict() +# create an instance of GuildChannelResponse from a dict +guild_channel_response_from_dict = GuildChannelResponse.from_dict(guild_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildCreateRequest.md b/docs/GuildCreateRequest.md new file mode 100644 index 0000000..a0aaac9 --- /dev/null +++ b/docs/GuildCreateRequest.md @@ -0,0 +1,42 @@ +# GuildCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**name** | **str** | | +**region** | **str** | | [optional] +**icon** | **str** | | [optional] +**verification_level** | **int** | | [optional] +**default_message_notifications** | **int** | | [optional] +**explicit_content_filter** | **int** | | [optional] +**preferred_locale** | **str** | | [optional] +**afk_timeout** | **int** | | [optional] +**roles** | [**List[CreateGuildRequestRoleItem]**](CreateGuildRequestRoleItem.md) | | [optional] +**channels** | [**List[CreateGuildRequestChannelItem]**](CreateGuildRequestChannelItem.md) | | [optional] +**afk_channel_id** | **str** | | [optional] +**system_channel_id** | **str** | | [optional] +**system_channel_flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.guild_create_request import GuildCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildCreateRequest from a JSON string +guild_create_request_instance = GuildCreateRequest.from_json(json) +# print the JSON string representation of the object +print(GuildCreateRequest.to_json()) + +# convert the object into a dict +guild_create_request_dict = guild_create_request_instance.to_dict() +# create an instance of GuildCreateRequest from a dict +guild_create_request_from_dict = GuildCreateRequest.from_dict(guild_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildHomeSettingsResponse.md b/docs/GuildHomeSettingsResponse.md new file mode 100644 index 0000000..f1a4b44 --- /dev/null +++ b/docs/GuildHomeSettingsResponse.md @@ -0,0 +1,33 @@ +# GuildHomeSettingsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_id** | **str** | | +**enabled** | **bool** | | +**welcome_message** | [**WelcomeMessageResponse**](WelcomeMessageResponse.md) | | [optional] +**new_member_actions** | [**List[Optional[NewMemberActionResponse]]**](NewMemberActionResponse.md) | | [optional] +**resource_channels** | [**List[Optional[ResourceChannelResponse]]**](ResourceChannelResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildHomeSettingsResponse from a JSON string +guild_home_settings_response_instance = GuildHomeSettingsResponse.from_json(json) +# print the JSON string representation of the object +print(GuildHomeSettingsResponse.to_json()) + +# convert the object into a dict +guild_home_settings_response_dict = guild_home_settings_response_instance.to_dict() +# create an instance of GuildHomeSettingsResponse from a dict +guild_home_settings_response_from_dict = GuildHomeSettingsResponse.from_dict(guild_home_settings_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildIncomingWebhookResponse.md b/docs/GuildIncomingWebhookResponse.md new file mode 100644 index 0000000..9283c0b --- /dev/null +++ b/docs/GuildIncomingWebhookResponse.md @@ -0,0 +1,38 @@ +# GuildIncomingWebhookResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | [optional] +**avatar** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**id** | **str** | | +**name** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**token** | **str** | | [optional] +**url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildIncomingWebhookResponse from a JSON string +guild_incoming_webhook_response_instance = GuildIncomingWebhookResponse.from_json(json) +# print the JSON string representation of the object +print(GuildIncomingWebhookResponse.to_json()) + +# convert the object into a dict +guild_incoming_webhook_response_dict = guild_incoming_webhook_response_instance.to_dict() +# create an instance of GuildIncomingWebhookResponse from a dict +guild_incoming_webhook_response_from_dict = GuildIncomingWebhookResponse.from_dict(guild_incoming_webhook_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildInviteResponse.md b/docs/GuildInviteResponse.md new file mode 100644 index 0000000..f36ed95 --- /dev/null +++ b/docs/GuildInviteResponse.md @@ -0,0 +1,49 @@ +# GuildInviteResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**code** | **str** | | +**inviter** | [**UserResponse**](UserResponse.md) | | [optional] +**max_age** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**expires_at** | **datetime** | | [optional] +**is_contact** | **bool** | | [optional] +**flags** | **int** | | [optional] +**guild** | [**InviteGuildResponse**](InviteGuildResponse.md) | | [optional] +**guild_id** | **str** | | [optional] +**channel** | [**InviteChannelResponse**](InviteChannelResponse.md) | | [optional] +**target_type** | **int** | | [optional] +**target_user** | [**UserResponse**](UserResponse.md) | | [optional] +**target_application** | [**InviteApplicationResponse**](InviteApplicationResponse.md) | | [optional] +**guild_scheduled_event** | [**ScheduledEventResponse**](ScheduledEventResponse.md) | | [optional] +**uses** | **int** | | [optional] +**max_uses** | **int** | | [optional] +**temporary** | **bool** | | [optional] +**approximate_member_count** | **int** | | [optional] +**approximate_presence_count** | **int** | | [optional] +**is_nickname_changeable** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.guild_invite_response import GuildInviteResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildInviteResponse from a JSON string +guild_invite_response_instance = GuildInviteResponse.from_json(json) +# print the JSON string representation of the object +print(GuildInviteResponse.to_json()) + +# convert the object into a dict +guild_invite_response_dict = guild_invite_response_instance.to_dict() +# create an instance of GuildInviteResponse from a dict +guild_invite_response_from_dict = GuildInviteResponse.from_dict(guild_invite_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildMFALevelResponse.md b/docs/GuildMFALevelResponse.md new file mode 100644 index 0000000..53a0ddd --- /dev/null +++ b/docs/GuildMFALevelResponse.md @@ -0,0 +1,29 @@ +# GuildMFALevelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level** | **int** | | + +## Example + +```python +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildMFALevelResponse from a JSON string +guild_mfa_level_response_instance = GuildMFALevelResponse.from_json(json) +# print the JSON string representation of the object +print(GuildMFALevelResponse.to_json()) + +# convert the object into a dict +guild_mfa_level_response_dict = guild_mfa_level_response_instance.to_dict() +# create an instance of GuildMFALevelResponse from a dict +guild_mfa_level_response_from_dict = GuildMFALevelResponse.from_dict(guild_mfa_level_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildMemberResponse.md b/docs/GuildMemberResponse.md new file mode 100644 index 0000000..8bafe36 --- /dev/null +++ b/docs/GuildMemberResponse.md @@ -0,0 +1,41 @@ +# GuildMemberResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar** | **str** | | [optional] +**avatar_decoration_data** | [**UserAvatarDecorationResponse**](UserAvatarDecorationResponse.md) | | [optional] +**banner** | **str** | | [optional] +**communication_disabled_until** | **datetime** | | [optional] +**flags** | **int** | | +**joined_at** | **datetime** | | +**nick** | **str** | | [optional] +**pending** | **bool** | | +**premium_since** | **datetime** | | [optional] +**roles** | **List[str]** | | +**user** | [**UserResponse**](UserResponse.md) | | +**mute** | **bool** | | +**deaf** | **bool** | | + +## Example + +```python +from dc_rest.models.guild_member_response import GuildMemberResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildMemberResponse from a JSON string +guild_member_response_instance = GuildMemberResponse.from_json(json) +# print the JSON string representation of the object +print(GuildMemberResponse.to_json()) + +# convert the object into a dict +guild_member_response_dict = guild_member_response_instance.to_dict() +# create an instance of GuildMemberResponse from a dict +guild_member_response_from_dict = GuildMemberResponse.from_dict(guild_member_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildOnboardingResponse.md b/docs/GuildOnboardingResponse.md new file mode 100644 index 0000000..d3129af --- /dev/null +++ b/docs/GuildOnboardingResponse.md @@ -0,0 +1,32 @@ +# GuildOnboardingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_id** | **str** | | +**prompts** | [**List[OnboardingPromptResponse]**](OnboardingPromptResponse.md) | | +**default_channel_ids** | **List[str]** | | +**enabled** | **bool** | | + +## Example + +```python +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildOnboardingResponse from a JSON string +guild_onboarding_response_instance = GuildOnboardingResponse.from_json(json) +# print the JSON string representation of the object +print(GuildOnboardingResponse.to_json()) + +# convert the object into a dict +guild_onboarding_response_dict = guild_onboarding_response_instance.to_dict() +# create an instance of GuildOnboardingResponse from a dict +guild_onboarding_response_from_dict = GuildOnboardingResponse.from_dict(guild_onboarding_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildPatchRequestPartial.md b/docs/GuildPatchRequestPartial.md new file mode 100644 index 0000000..732ff93 --- /dev/null +++ b/docs/GuildPatchRequestPartial.md @@ -0,0 +1,50 @@ +# GuildPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**region** | **str** | | [optional] +**icon** | **str** | | [optional] +**verification_level** | **int** | | [optional] +**default_message_notifications** | **int** | | [optional] +**explicit_content_filter** | **int** | | [optional] +**preferred_locale** | **str** | | [optional] +**afk_timeout** | **int** | | [optional] +**afk_channel_id** | **str** | | [optional] +**system_channel_id** | **str** | | [optional] +**owner_id** | **str** | | [optional] +**splash** | **str** | | [optional] +**banner** | **str** | | [optional] +**system_channel_flags** | **int** | | [optional] +**features** | **List[Optional[str]]** | | [optional] +**discovery_splash** | **str** | | [optional] +**home_header** | **str** | | [optional] +**rules_channel_id** | **str** | | [optional] +**safety_alerts_channel_id** | **str** | | [optional] +**public_updates_channel_id** | **str** | | [optional] +**premium_progress_bar_enabled** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildPatchRequestPartial from a JSON string +guild_patch_request_partial_instance = GuildPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(GuildPatchRequestPartial.to_json()) + +# convert the object into a dict +guild_patch_request_partial_dict = guild_patch_request_partial_instance.to_dict() +# create an instance of GuildPatchRequestPartial from a dict +guild_patch_request_partial_from_dict = GuildPatchRequestPartial.from_dict(guild_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildPreviewResponse.md b/docs/GuildPreviewResponse.md new file mode 100644 index 0000000..a8bfe3c --- /dev/null +++ b/docs/GuildPreviewResponse.md @@ -0,0 +1,40 @@ +# GuildPreviewResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | [optional] +**home_header** | **str** | | [optional] +**splash** | **str** | | [optional] +**discovery_splash** | **str** | | [optional] +**features** | **List[str]** | | +**approximate_member_count** | **int** | | +**approximate_presence_count** | **int** | | +**emojis** | [**List[EmojiResponse]**](EmojiResponse.md) | | +**stickers** | [**List[GuildStickerResponse]**](GuildStickerResponse.md) | | + +## Example + +```python +from dc_rest.models.guild_preview_response import GuildPreviewResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildPreviewResponse from a JSON string +guild_preview_response_instance = GuildPreviewResponse.from_json(json) +# print the JSON string representation of the object +print(GuildPreviewResponse.to_json()) + +# convert the object into a dict +guild_preview_response_dict = guild_preview_response_instance.to_dict() +# create an instance of GuildPreviewResponse from a dict +guild_preview_response_from_dict = GuildPreviewResponse.from_dict(guild_preview_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildProductPurchaseResponse.md b/docs/GuildProductPurchaseResponse.md new file mode 100644 index 0000000..07d7d6d --- /dev/null +++ b/docs/GuildProductPurchaseResponse.md @@ -0,0 +1,30 @@ +# GuildProductPurchaseResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_id** | **str** | | +**product_name** | **str** | | + +## Example + +```python +from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildProductPurchaseResponse from a JSON string +guild_product_purchase_response_instance = GuildProductPurchaseResponse.from_json(json) +# print the JSON string representation of the object +print(GuildProductPurchaseResponse.to_json()) + +# convert the object into a dict +guild_product_purchase_response_dict = guild_product_purchase_response_instance.to_dict() +# create an instance of GuildProductPurchaseResponse from a dict +guild_product_purchase_response_from_dict = GuildProductPurchaseResponse.from_dict(guild_product_purchase_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildPruneResponse.md b/docs/GuildPruneResponse.md new file mode 100644 index 0000000..aa49b99 --- /dev/null +++ b/docs/GuildPruneResponse.md @@ -0,0 +1,29 @@ +# GuildPruneResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pruned** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.guild_prune_response import GuildPruneResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildPruneResponse from a JSON string +guild_prune_response_instance = GuildPruneResponse.from_json(json) +# print the JSON string representation of the object +print(GuildPruneResponse.to_json()) + +# convert the object into a dict +guild_prune_response_dict = guild_prune_response_instance.to_dict() +# create an instance of GuildPruneResponse from a dict +guild_prune_response_from_dict = GuildPruneResponse.from_dict(guild_prune_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildResponse.md b/docs/GuildResponse.md new file mode 100644 index 0000000..b9bf853 --- /dev/null +++ b/docs/GuildResponse.md @@ -0,0 +1,67 @@ +# GuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | [optional] +**home_header** | **str** | | [optional] +**splash** | **str** | | [optional] +**discovery_splash** | **str** | | [optional] +**features** | **List[str]** | | +**banner** | **str** | | [optional] +**owner_id** | **str** | | +**application_id** | **str** | | [optional] +**region** | **str** | | +**afk_channel_id** | **str** | | [optional] +**afk_timeout** | **int** | | +**system_channel_id** | **str** | | [optional] +**system_channel_flags** | **int** | | +**widget_enabled** | **bool** | | +**widget_channel_id** | **str** | | [optional] +**verification_level** | **int** | | +**roles** | [**List[GuildRoleResponse]**](GuildRoleResponse.md) | | +**default_message_notifications** | **int** | | +**mfa_level** | **int** | | +**explicit_content_filter** | **int** | | +**max_presences** | **int** | | [optional] +**max_members** | **int** | | [optional] +**max_stage_video_channel_users** | **int** | | [optional] +**max_video_channel_users** | **int** | | [optional] +**vanity_url_code** | **str** | | [optional] +**premium_tier** | **int** | | +**premium_subscription_count** | **int** | | +**preferred_locale** | **str** | | +**rules_channel_id** | **str** | | [optional] +**safety_alerts_channel_id** | **str** | | [optional] +**public_updates_channel_id** | **str** | | [optional] +**premium_progress_bar_enabled** | **bool** | | +**nsfw** | **bool** | | +**nsfw_level** | **int** | | +**emojis** | [**List[EmojiResponse]**](EmojiResponse.md) | | +**stickers** | [**List[GuildStickerResponse]**](GuildStickerResponse.md) | | + +## Example + +```python +from dc_rest.models.guild_response import GuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildResponse from a JSON string +guild_response_instance = GuildResponse.from_json(json) +# print the JSON string representation of the object +print(GuildResponse.to_json()) + +# convert the object into a dict +guild_response_dict = guild_response_instance.to_dict() +# create an instance of GuildResponse from a dict +guild_response_from_dict = GuildResponse.from_dict(guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildRoleResponse.md b/docs/GuildRoleResponse.md new file mode 100644 index 0000000..3e44820 --- /dev/null +++ b/docs/GuildRoleResponse.md @@ -0,0 +1,40 @@ +# GuildRoleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**permissions** | **str** | | +**position** | **int** | | +**color** | **int** | | +**hoist** | **bool** | | +**managed** | **bool** | | +**mentionable** | **bool** | | +**icon** | **str** | | [optional] +**unicode_emoji** | **str** | | [optional] +**tags** | [**GuildRoleTagsResponse**](GuildRoleTagsResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.guild_role_response import GuildRoleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildRoleResponse from a JSON string +guild_role_response_instance = GuildRoleResponse.from_json(json) +# print the JSON string representation of the object +print(GuildRoleResponse.to_json()) + +# convert the object into a dict +guild_role_response_dict = guild_role_response_instance.to_dict() +# create an instance of GuildRoleResponse from a dict +guild_role_response_from_dict = GuildRoleResponse.from_dict(guild_role_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildRoleTagsResponse.md b/docs/GuildRoleTagsResponse.md new file mode 100644 index 0000000..ee11fcf --- /dev/null +++ b/docs/GuildRoleTagsResponse.md @@ -0,0 +1,34 @@ +# GuildRoleTagsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**premium_subscriber** | **object** | | [optional] +**bot_id** | **str** | | [optional] +**integration_id** | **str** | | [optional] +**subscription_listing_id** | **str** | | [optional] +**available_for_purchase** | **object** | | [optional] +**guild_connections** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildRoleTagsResponse from a JSON string +guild_role_tags_response_instance = GuildRoleTagsResponse.from_json(json) +# print the JSON string representation of the object +print(GuildRoleTagsResponse.to_json()) + +# convert the object into a dict +guild_role_tags_response_dict = guild_role_tags_response_instance.to_dict() +# create an instance of GuildRoleTagsResponse from a dict +guild_role_tags_response_from_dict = GuildRoleTagsResponse.from_dict(guild_role_tags_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildStickerResponse.md b/docs/GuildStickerResponse.md new file mode 100644 index 0000000..9198ede --- /dev/null +++ b/docs/GuildStickerResponse.md @@ -0,0 +1,37 @@ +# GuildStickerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**tags** | **str** | | +**type** | **int** | | +**format_type** | **int** | | [optional] +**description** | **str** | | [optional] +**available** | **bool** | | +**guild_id** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.guild_sticker_response import GuildStickerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildStickerResponse from a JSON string +guild_sticker_response_instance = GuildStickerResponse.from_json(json) +# print the JSON string representation of the object +print(GuildStickerResponse.to_json()) + +# convert the object into a dict +guild_sticker_response_dict = guild_sticker_response_instance.to_dict() +# create an instance of GuildStickerResponse from a dict +guild_sticker_response_from_dict = GuildStickerResponse.from_dict(guild_sticker_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildSubscriptionIntegrationResponse.md b/docs/GuildSubscriptionIntegrationResponse.md new file mode 100644 index 0000000..4ea1cab --- /dev/null +++ b/docs/GuildSubscriptionIntegrationResponse.md @@ -0,0 +1,33 @@ +# GuildSubscriptionIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**enabled** | **bool** | | [optional] +**id** | **str** | | + +## Example + +```python +from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildSubscriptionIntegrationResponse from a JSON string +guild_subscription_integration_response_instance = GuildSubscriptionIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(GuildSubscriptionIntegrationResponse.to_json()) + +# convert the object into a dict +guild_subscription_integration_response_dict = guild_subscription_integration_response_instance.to_dict() +# create an instance of GuildSubscriptionIntegrationResponse from a dict +guild_subscription_integration_response_from_dict = GuildSubscriptionIntegrationResponse.from_dict(guild_subscription_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildTemplateChannelResponse.md b/docs/GuildTemplateChannelResponse.md new file mode 100644 index 0000000..8f4abdd --- /dev/null +++ b/docs/GuildTemplateChannelResponse.md @@ -0,0 +1,49 @@ +# GuildTemplateChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**type** | **int** | | +**name** | **str** | | [optional] +**position** | **int** | | [optional] +**topic** | **str** | | [optional] +**bitrate** | **int** | | +**user_limit** | **int** | | +**nsfw** | **bool** | | +**rate_limit_per_user** | **int** | | +**parent_id** | **str** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**permission_overwrites** | [**List[Optional[ChannelPermissionOverwriteResponse]]**](ChannelPermissionOverwriteResponse.md) | | +**available_tags** | [**List[GuildTemplateChannelTags]**](GuildTemplateChannelTags.md) | | [optional] +**template** | **str** | | +**default_reaction_emoji** | [**DefaultReactionEmojiResponse**](DefaultReactionEmojiResponse.md) | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**icon_emoji** | **object** | | [optional] +**theme_color** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildTemplateChannelResponse from a JSON string +guild_template_channel_response_instance = GuildTemplateChannelResponse.from_json(json) +# print the JSON string representation of the object +print(GuildTemplateChannelResponse.to_json()) + +# convert the object into a dict +guild_template_channel_response_dict = guild_template_channel_response_instance.to_dict() +# create an instance of GuildTemplateChannelResponse from a dict +guild_template_channel_response_from_dict = GuildTemplateChannelResponse.from_dict(guild_template_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildTemplateChannelTags.md b/docs/GuildTemplateChannelTags.md new file mode 100644 index 0000000..a59ff0b --- /dev/null +++ b/docs/GuildTemplateChannelTags.md @@ -0,0 +1,32 @@ +# GuildTemplateChannelTags + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**moderated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildTemplateChannelTags from a JSON string +guild_template_channel_tags_instance = GuildTemplateChannelTags.from_json(json) +# print the JSON string representation of the object +print(GuildTemplateChannelTags.to_json()) + +# convert the object into a dict +guild_template_channel_tags_dict = guild_template_channel_tags_instance.to_dict() +# create an instance of GuildTemplateChannelTags from a dict +guild_template_channel_tags_from_dict = GuildTemplateChannelTags.from_dict(guild_template_channel_tags_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildTemplateResponse.md b/docs/GuildTemplateResponse.md new file mode 100644 index 0000000..184bd1a --- /dev/null +++ b/docs/GuildTemplateResponse.md @@ -0,0 +1,39 @@ +# GuildTemplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**usage_count** | **int** | | +**creator_id** | **str** | | +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**source_guild_id** | **str** | | +**serialized_source_guild** | [**GuildTemplateSnapshotResponse**](GuildTemplateSnapshotResponse.md) | | +**is_dirty** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.guild_template_response import GuildTemplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildTemplateResponse from a JSON string +guild_template_response_instance = GuildTemplateResponse.from_json(json) +# print the JSON string representation of the object +print(GuildTemplateResponse.to_json()) + +# convert the object into a dict +guild_template_response_dict = guild_template_response_instance.to_dict() +# create an instance of GuildTemplateResponse from a dict +guild_template_response_from_dict = GuildTemplateResponse.from_dict(guild_template_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildTemplateRoleResponse.md b/docs/GuildTemplateRoleResponse.md new file mode 100644 index 0000000..a9a21b0 --- /dev/null +++ b/docs/GuildTemplateRoleResponse.md @@ -0,0 +1,36 @@ +# GuildTemplateRoleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**permissions** | **str** | | +**color** | **int** | | +**hoist** | **bool** | | +**mentionable** | **bool** | | +**icon** | **str** | | [optional] +**unicode_emoji** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildTemplateRoleResponse from a JSON string +guild_template_role_response_instance = GuildTemplateRoleResponse.from_json(json) +# print the JSON string representation of the object +print(GuildTemplateRoleResponse.to_json()) + +# convert the object into a dict +guild_template_role_response_dict = guild_template_role_response_instance.to_dict() +# create an instance of GuildTemplateRoleResponse from a dict +guild_template_role_response_from_dict = GuildTemplateRoleResponse.from_dict(guild_template_role_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildTemplateSnapshotResponse.md b/docs/GuildTemplateSnapshotResponse.md new file mode 100644 index 0000000..e305d50 --- /dev/null +++ b/docs/GuildTemplateSnapshotResponse.md @@ -0,0 +1,41 @@ +# GuildTemplateSnapshotResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**region** | **str** | | [optional] +**verification_level** | **int** | | +**default_message_notifications** | **int** | | +**explicit_content_filter** | **int** | | +**preferred_locale** | **str** | | +**afk_channel_id** | **str** | | [optional] +**afk_timeout** | **int** | | +**system_channel_id** | **str** | | [optional] +**system_channel_flags** | **int** | | +**roles** | [**List[GuildTemplateRoleResponse]**](GuildTemplateRoleResponse.md) | | +**channels** | [**List[GuildTemplateChannelResponse]**](GuildTemplateChannelResponse.md) | | + +## Example + +```python +from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildTemplateSnapshotResponse from a JSON string +guild_template_snapshot_response_instance = GuildTemplateSnapshotResponse.from_json(json) +# print the JSON string representation of the object +print(GuildTemplateSnapshotResponse.to_json()) + +# convert the object into a dict +guild_template_snapshot_response_dict = guild_template_snapshot_response_instance.to_dict() +# create an instance of GuildTemplateSnapshotResponse from a dict +guild_template_snapshot_response_from_dict = GuildTemplateSnapshotResponse.from_dict(guild_template_snapshot_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildWelcomeChannel.md b/docs/GuildWelcomeChannel.md new file mode 100644 index 0000000..73078ed --- /dev/null +++ b/docs/GuildWelcomeChannel.md @@ -0,0 +1,32 @@ +# GuildWelcomeChannel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | +**description** | **str** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildWelcomeChannel from a JSON string +guild_welcome_channel_instance = GuildWelcomeChannel.from_json(json) +# print the JSON string representation of the object +print(GuildWelcomeChannel.to_json()) + +# convert the object into a dict +guild_welcome_channel_dict = guild_welcome_channel_instance.to_dict() +# create an instance of GuildWelcomeChannel from a dict +guild_welcome_channel_from_dict = GuildWelcomeChannel.from_dict(guild_welcome_channel_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildWelcomeScreenChannelResponse.md b/docs/GuildWelcomeScreenChannelResponse.md new file mode 100644 index 0000000..0b65f2a --- /dev/null +++ b/docs/GuildWelcomeScreenChannelResponse.md @@ -0,0 +1,32 @@ +# GuildWelcomeScreenChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | +**description** | **str** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildWelcomeScreenChannelResponse from a JSON string +guild_welcome_screen_channel_response_instance = GuildWelcomeScreenChannelResponse.from_json(json) +# print the JSON string representation of the object +print(GuildWelcomeScreenChannelResponse.to_json()) + +# convert the object into a dict +guild_welcome_screen_channel_response_dict = guild_welcome_screen_channel_response_instance.to_dict() +# create an instance of GuildWelcomeScreenChannelResponse from a dict +guild_welcome_screen_channel_response_from_dict = GuildWelcomeScreenChannelResponse.from_dict(guild_welcome_screen_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildWelcomeScreenResponse.md b/docs/GuildWelcomeScreenResponse.md new file mode 100644 index 0000000..a90af34 --- /dev/null +++ b/docs/GuildWelcomeScreenResponse.md @@ -0,0 +1,30 @@ +# GuildWelcomeScreenResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**welcome_channels** | [**List[GuildWelcomeScreenChannelResponse]**](GuildWelcomeScreenChannelResponse.md) | | + +## Example + +```python +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildWelcomeScreenResponse from a JSON string +guild_welcome_screen_response_instance = GuildWelcomeScreenResponse.from_json(json) +# print the JSON string representation of the object +print(GuildWelcomeScreenResponse.to_json()) + +# convert the object into a dict +guild_welcome_screen_response_dict = guild_welcome_screen_response_instance.to_dict() +# create an instance of GuildWelcomeScreenResponse from a dict +guild_welcome_screen_response_from_dict = GuildWelcomeScreenResponse.from_dict(guild_welcome_screen_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GuildWithCountsResponse.md b/docs/GuildWithCountsResponse.md new file mode 100644 index 0000000..ec67c23 --- /dev/null +++ b/docs/GuildWithCountsResponse.md @@ -0,0 +1,69 @@ +# GuildWithCountsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | [optional] +**home_header** | **str** | | [optional] +**splash** | **str** | | [optional] +**discovery_splash** | **str** | | [optional] +**features** | **List[str]** | | +**banner** | **str** | | [optional] +**owner_id** | **str** | | +**application_id** | **str** | | [optional] +**region** | **str** | | +**afk_channel_id** | **str** | | [optional] +**afk_timeout** | **int** | | +**system_channel_id** | **str** | | [optional] +**system_channel_flags** | **int** | | +**widget_enabled** | **bool** | | +**widget_channel_id** | **str** | | [optional] +**verification_level** | **int** | | +**roles** | [**List[GuildRoleResponse]**](GuildRoleResponse.md) | | +**default_message_notifications** | **int** | | +**mfa_level** | **int** | | +**explicit_content_filter** | **int** | | +**max_presences** | **int** | | [optional] +**max_members** | **int** | | [optional] +**max_stage_video_channel_users** | **int** | | [optional] +**max_video_channel_users** | **int** | | [optional] +**vanity_url_code** | **str** | | [optional] +**premium_tier** | **int** | | +**premium_subscription_count** | **int** | | +**preferred_locale** | **str** | | +**rules_channel_id** | **str** | | [optional] +**safety_alerts_channel_id** | **str** | | [optional] +**public_updates_channel_id** | **str** | | [optional] +**premium_progress_bar_enabled** | **bool** | | +**nsfw** | **bool** | | +**nsfw_level** | **int** | | +**emojis** | [**List[EmojiResponse]**](EmojiResponse.md) | | +**stickers** | [**List[GuildStickerResponse]**](GuildStickerResponse.md) | | +**approximate_member_count** | **int** | | [optional] +**approximate_presence_count** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GuildWithCountsResponse from a JSON string +guild_with_counts_response_instance = GuildWithCountsResponse.from_json(json) +# print the JSON string representation of the object +print(GuildWithCountsResponse.to_json()) + +# convert the object into a dict +guild_with_counts_response_dict = guild_with_counts_response_instance.to_dict() +# create an instance of GuildWithCountsResponse from a dict +guild_with_counts_response_from_dict = GuildWithCountsResponse.from_dict(guild_with_counts_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncomingWebhookInteractionRequest.md b/docs/IncomingWebhookInteractionRequest.md new file mode 100644 index 0000000..6320043 --- /dev/null +++ b/docs/IncomingWebhookInteractionRequest.md @@ -0,0 +1,36 @@ +# IncomingWebhookInteractionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**tts** | **bool** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingWebhookInteractionRequest from a JSON string +incoming_webhook_interaction_request_instance = IncomingWebhookInteractionRequest.from_json(json) +# print the JSON string representation of the object +print(IncomingWebhookInteractionRequest.to_json()) + +# convert the object into a dict +incoming_webhook_interaction_request_dict = incoming_webhook_interaction_request_instance.to_dict() +# create an instance of IncomingWebhookInteractionRequest from a dict +incoming_webhook_interaction_request_from_dict = IncomingWebhookInteractionRequest.from_dict(incoming_webhook_interaction_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncomingWebhookRequestPartial.md b/docs/IncomingWebhookRequestPartial.md new file mode 100644 index 0000000..46e9585 --- /dev/null +++ b/docs/IncomingWebhookRequestPartial.md @@ -0,0 +1,40 @@ +# IncomingWebhookRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**tts** | **bool** | | [optional] +**flags** | **int** | | [optional] +**username** | **str** | | [optional] +**avatar_url** | **str** | | [optional] +**thread_name** | **str** | | [optional] +**applied_tags** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingWebhookRequestPartial from a JSON string +incoming_webhook_request_partial_instance = IncomingWebhookRequestPartial.from_json(json) +# print the JSON string representation of the object +print(IncomingWebhookRequestPartial.to_json()) + +# convert the object into a dict +incoming_webhook_request_partial_dict = incoming_webhook_request_partial_instance.to_dict() +# create an instance of IncomingWebhookRequestPartial from a dict +incoming_webhook_request_partial_from_dict = IncomingWebhookRequestPartial.from_dict(incoming_webhook_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md b/docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md new file mode 100644 index 0000000..8323bf4 --- /dev/null +++ b/docs/IncomingWebhookUpdateForInteractionCallbackRequestPartial.md @@ -0,0 +1,34 @@ +# IncomingWebhookUpdateForInteractionCallbackRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a JSON string +incoming_webhook_update_for_interaction_callback_request_partial_instance = IncomingWebhookUpdateForInteractionCallbackRequestPartial.from_json(json) +# print the JSON string representation of the object +print(IncomingWebhookUpdateForInteractionCallbackRequestPartial.to_json()) + +# convert the object into a dict +incoming_webhook_update_for_interaction_callback_request_partial_dict = incoming_webhook_update_for_interaction_callback_request_partial_instance.to_dict() +# create an instance of IncomingWebhookUpdateForInteractionCallbackRequestPartial from a dict +incoming_webhook_update_for_interaction_callback_request_partial_from_dict = IncomingWebhookUpdateForInteractionCallbackRequestPartial.from_dict(incoming_webhook_update_for_interaction_callback_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncomingWebhookUpdateRequestPartial.md b/docs/IncomingWebhookUpdateRequestPartial.md new file mode 100644 index 0000000..c6a7a7f --- /dev/null +++ b/docs/IncomingWebhookUpdateRequestPartial.md @@ -0,0 +1,35 @@ +# IncomingWebhookUpdateRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingWebhookUpdateRequestPartial from a JSON string +incoming_webhook_update_request_partial_instance = IncomingWebhookUpdateRequestPartial.from_json(json) +# print the JSON string representation of the object +print(IncomingWebhookUpdateRequestPartial.to_json()) + +# convert the object into a dict +incoming_webhook_update_request_partial_dict = incoming_webhook_update_request_partial_instance.to_dict() +# create an instance of IncomingWebhookUpdateRequestPartial from a dict +incoming_webhook_update_request_partial_from_dict = IncomingWebhookUpdateRequestPartial.from_dict(incoming_webhook_update_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InnerErrors.md b/docs/InnerErrors.md new file mode 100644 index 0000000..b1103cf --- /dev/null +++ b/docs/InnerErrors.md @@ -0,0 +1,29 @@ +# InnerErrors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List[Error]**](Error.md) | The list of errors for this field | + +## Example + +```python +from dc_rest.models.inner_errors import InnerErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of InnerErrors from a JSON string +inner_errors_instance = InnerErrors.from_json(json) +# print the JSON string representation of the object +print(InnerErrors.to_json()) + +# convert the object into a dict +inner_errors_dict = inner_errors_instance.to_dict() +# create an instance of InnerErrors from a dict +inner_errors_from_dict = InnerErrors.from_dict(inner_errors_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationApplicationResponse.md b/docs/IntegrationApplicationResponse.md new file mode 100644 index 0000000..9c262d9 --- /dev/null +++ b/docs/IntegrationApplicationResponse.md @@ -0,0 +1,36 @@ +# IntegrationApplicationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | +**type** | **int** | | [optional] +**cover_image** | **str** | | [optional] +**primary_sku_id** | **str** | | [optional] +**bot** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.integration_application_response import IntegrationApplicationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IntegrationApplicationResponse from a JSON string +integration_application_response_instance = IntegrationApplicationResponse.from_json(json) +# print the JSON string representation of the object +print(IntegrationApplicationResponse.to_json()) + +# convert the object into a dict +integration_application_response_dict = integration_application_response_instance.to_dict() +# create an instance of IntegrationApplicationResponse from a dict +integration_application_response_from_dict = IntegrationApplicationResponse.from_dict(integration_application_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md b/docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md new file mode 100644 index 0000000..bb33b73 --- /dev/null +++ b/docs/InteractionApplicationCommandAutocompleteCallbackIntegerData.md @@ -0,0 +1,29 @@ +# InteractionApplicationCommandAutocompleteCallbackIntegerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**choices** | [**List[Optional[ApplicationCommandOptionIntegerChoice]]**](ApplicationCommandOptionIntegerChoice.md) | | [optional] + +## Example + +```python +from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a JSON string +interaction_application_command_autocomplete_callback_integer_data_instance = InteractionApplicationCommandAutocompleteCallbackIntegerData.from_json(json) +# print the JSON string representation of the object +print(InteractionApplicationCommandAutocompleteCallbackIntegerData.to_json()) + +# convert the object into a dict +interaction_application_command_autocomplete_callback_integer_data_dict = interaction_application_command_autocomplete_callback_integer_data_instance.to_dict() +# create an instance of InteractionApplicationCommandAutocompleteCallbackIntegerData from a dict +interaction_application_command_autocomplete_callback_integer_data_from_dict = InteractionApplicationCommandAutocompleteCallbackIntegerData.from_dict(interaction_application_command_autocomplete_callback_integer_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md b/docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md new file mode 100644 index 0000000..be74ebc --- /dev/null +++ b/docs/InteractionApplicationCommandAutocompleteCallbackNumberData.md @@ -0,0 +1,29 @@ +# InteractionApplicationCommandAutocompleteCallbackNumberData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**choices** | [**List[Optional[ApplicationCommandOptionNumberChoice]]**](ApplicationCommandOptionNumberChoice.md) | | [optional] + +## Example + +```python +from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a JSON string +interaction_application_command_autocomplete_callback_number_data_instance = InteractionApplicationCommandAutocompleteCallbackNumberData.from_json(json) +# print the JSON string representation of the object +print(InteractionApplicationCommandAutocompleteCallbackNumberData.to_json()) + +# convert the object into a dict +interaction_application_command_autocomplete_callback_number_data_dict = interaction_application_command_autocomplete_callback_number_data_instance.to_dict() +# create an instance of InteractionApplicationCommandAutocompleteCallbackNumberData from a dict +interaction_application_command_autocomplete_callback_number_data_from_dict = InteractionApplicationCommandAutocompleteCallbackNumberData.from_dict(interaction_application_command_autocomplete_callback_number_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionApplicationCommandAutocompleteCallbackStringData.md b/docs/InteractionApplicationCommandAutocompleteCallbackStringData.md new file mode 100644 index 0000000..8ebb504 --- /dev/null +++ b/docs/InteractionApplicationCommandAutocompleteCallbackStringData.md @@ -0,0 +1,29 @@ +# InteractionApplicationCommandAutocompleteCallbackStringData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**choices** | [**List[Optional[ApplicationCommandOptionStringChoice]]**](ApplicationCommandOptionStringChoice.md) | | [optional] + +## Example + +```python +from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a JSON string +interaction_application_command_autocomplete_callback_string_data_instance = InteractionApplicationCommandAutocompleteCallbackStringData.from_json(json) +# print the JSON string representation of the object +print(InteractionApplicationCommandAutocompleteCallbackStringData.to_json()) + +# convert the object into a dict +interaction_application_command_autocomplete_callback_string_data_dict = interaction_application_command_autocomplete_callback_string_data_instance.to_dict() +# create an instance of InteractionApplicationCommandAutocompleteCallbackStringData from a dict +interaction_application_command_autocomplete_callback_string_data_from_dict = InteractionApplicationCommandAutocompleteCallbackStringData.from_dict(interaction_application_command_autocomplete_callback_string_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionCallbackResponse.md b/docs/InteractionCallbackResponse.md new file mode 100644 index 0000000..1858e6e --- /dev/null +++ b/docs/InteractionCallbackResponse.md @@ -0,0 +1,30 @@ +# InteractionCallbackResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interaction** | [**InteractionResponse**](InteractionResponse.md) | | +**resource** | [**InteractionCallbackResponseResource**](InteractionCallbackResponseResource.md) | | [optional] + +## Example + +```python +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionCallbackResponse from a JSON string +interaction_callback_response_instance = InteractionCallbackResponse.from_json(json) +# print the JSON string representation of the object +print(InteractionCallbackResponse.to_json()) + +# convert the object into a dict +interaction_callback_response_dict = interaction_callback_response_instance.to_dict() +# create an instance of InteractionCallbackResponse from a dict +interaction_callback_response_from_dict = InteractionCallbackResponse.from_dict(interaction_callback_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionCallbackResponseResource.md b/docs/InteractionCallbackResponseResource.md new file mode 100644 index 0000000..1781aa0 --- /dev/null +++ b/docs/InteractionCallbackResponseResource.md @@ -0,0 +1,30 @@ +# InteractionCallbackResponseResource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**message** | [**MessageResponse**](MessageResponse.md) | | + +## Example + +```python +from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionCallbackResponseResource from a JSON string +interaction_callback_response_resource_instance = InteractionCallbackResponseResource.from_json(json) +# print the JSON string representation of the object +print(InteractionCallbackResponseResource.to_json()) + +# convert the object into a dict +interaction_callback_response_resource_dict = interaction_callback_response_resource_instance.to_dict() +# create an instance of InteractionCallbackResponseResource from a dict +interaction_callback_response_resource_from_dict = InteractionCallbackResponseResource.from_dict(interaction_callback_response_resource_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InteractionResponse.md b/docs/InteractionResponse.md new file mode 100644 index 0000000..da96c85 --- /dev/null +++ b/docs/InteractionResponse.md @@ -0,0 +1,35 @@ +# InteractionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**response_message_id** | **str** | | [optional] +**response_message_loading** | **bool** | | [optional] +**response_message_ephemeral** | **bool** | | [optional] +**channel_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.interaction_response import InteractionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InteractionResponse from a JSON string +interaction_response_instance = InteractionResponse.from_json(json) +# print the JSON string representation of the object +print(InteractionResponse.to_json()) + +# convert the object into a dict +interaction_response_dict = interaction_response_instance.to_dict() +# create an instance of InteractionResponse from a dict +interaction_response_from_dict = InteractionResponse.from_dict(interaction_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteApplicationResponse.md b/docs/InviteApplicationResponse.md new file mode 100644 index 0000000..acd3e37 --- /dev/null +++ b/docs/InviteApplicationResponse.md @@ -0,0 +1,50 @@ +# InviteApplicationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | +**type** | **int** | | [optional] +**cover_image** | **str** | | [optional] +**primary_sku_id** | **str** | | [optional] +**bot** | [**UserResponse**](UserResponse.md) | | [optional] +**slug** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**rpc_origins** | **List[Optional[str]]** | | [optional] +**bot_public** | **bool** | | [optional] +**bot_require_code_grant** | **bool** | | [optional] +**terms_of_service_url** | **str** | | [optional] +**privacy_policy_url** | **str** | | [optional] +**custom_install_url** | **str** | | [optional] +**install_params** | [**ApplicationOAuth2InstallParamsResponse**](ApplicationOAuth2InstallParamsResponse.md) | | [optional] +**integration_types_config** | [**Dict[str, ApplicationIntegrationTypeConfigurationResponse]**](ApplicationIntegrationTypeConfigurationResponse.md) | | [optional] +**verify_key** | **str** | | +**flags** | **int** | | +**max_participants** | **int** | | [optional] +**tags** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.invite_application_response import InviteApplicationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteApplicationResponse from a JSON string +invite_application_response_instance = InviteApplicationResponse.from_json(json) +# print the JSON string representation of the object +print(InviteApplicationResponse.to_json()) + +# convert the object into a dict +invite_application_response_dict = invite_application_response_instance.to_dict() +# create an instance of InviteApplicationResponse from a dict +invite_application_response_from_dict = InviteApplicationResponse.from_dict(invite_application_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteChannelRecipientResponse.md b/docs/InviteChannelRecipientResponse.md new file mode 100644 index 0000000..18ff335 --- /dev/null +++ b/docs/InviteChannelRecipientResponse.md @@ -0,0 +1,29 @@ +# InviteChannelRecipientResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | + +## Example + +```python +from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteChannelRecipientResponse from a JSON string +invite_channel_recipient_response_instance = InviteChannelRecipientResponse.from_json(json) +# print the JSON string representation of the object +print(InviteChannelRecipientResponse.to_json()) + +# convert the object into a dict +invite_channel_recipient_response_dict = invite_channel_recipient_response_instance.to_dict() +# create an instance of InviteChannelRecipientResponse from a dict +invite_channel_recipient_response_from_dict = InviteChannelRecipientResponse.from_dict(invite_channel_recipient_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteChannelResponse.md b/docs/InviteChannelResponse.md new file mode 100644 index 0000000..5cd2429 --- /dev/null +++ b/docs/InviteChannelResponse.md @@ -0,0 +1,33 @@ +# InviteChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**name** | **str** | | [optional] +**icon** | **str** | | [optional] +**recipients** | [**List[InviteChannelRecipientResponse]**](InviteChannelRecipientResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.invite_channel_response import InviteChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteChannelResponse from a JSON string +invite_channel_response_instance = InviteChannelResponse.from_json(json) +# print the JSON string representation of the object +print(InviteChannelResponse.to_json()) + +# convert the object into a dict +invite_channel_response_dict = invite_channel_response_instance.to_dict() +# create an instance of InviteChannelResponse from a dict +invite_channel_response_from_dict = InviteChannelResponse.from_dict(invite_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteGuildResponse.md b/docs/InviteGuildResponse.md new file mode 100644 index 0000000..80436fd --- /dev/null +++ b/docs/InviteGuildResponse.md @@ -0,0 +1,40 @@ +# InviteGuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**splash** | **str** | | [optional] +**banner** | **str** | | [optional] +**description** | **str** | | [optional] +**icon** | **str** | | [optional] +**features** | **List[str]** | | +**verification_level** | **int** | | [optional] +**vanity_url_code** | **str** | | [optional] +**nsfw_level** | **int** | | [optional] +**nsfw** | **bool** | | [optional] +**premium_subscription_count** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.invite_guild_response import InviteGuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteGuildResponse from a JSON string +invite_guild_response_instance = InviteGuildResponse.from_json(json) +# print the JSON string representation of the object +print(InviteGuildResponse.to_json()) + +# convert the object into a dict +invite_guild_response_dict = invite_guild_response_instance.to_dict() +# create an instance of InviteGuildResponse from a dict +invite_guild_response_from_dict = InviteGuildResponse.from_dict(invite_guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordRuleResponse.md b/docs/KeywordRuleResponse.md new file mode 100644 index 0000000..767cc99 --- /dev/null +++ b/docs/KeywordRuleResponse.md @@ -0,0 +1,39 @@ +# KeywordRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | [**KeywordTriggerMetadataResponse**](KeywordTriggerMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.keyword_rule_response import KeywordRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of KeywordRuleResponse from a JSON string +keyword_rule_response_instance = KeywordRuleResponse.from_json(json) +# print the JSON string representation of the object +print(KeywordRuleResponse.to_json()) + +# convert the object into a dict +keyword_rule_response_dict = keyword_rule_response_instance.to_dict() +# create an instance of KeywordRuleResponse from a dict +keyword_rule_response_from_dict = KeywordRuleResponse.from_dict(keyword_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordTriggerMetadata.md b/docs/KeywordTriggerMetadata.md new file mode 100644 index 0000000..b3ff788 --- /dev/null +++ b/docs/KeywordTriggerMetadata.md @@ -0,0 +1,31 @@ +# KeywordTriggerMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword_filter** | **List[str]** | | [optional] +**regex_patterns** | **List[str]** | | [optional] +**allow_list** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of KeywordTriggerMetadata from a JSON string +keyword_trigger_metadata_instance = KeywordTriggerMetadata.from_json(json) +# print the JSON string representation of the object +print(KeywordTriggerMetadata.to_json()) + +# convert the object into a dict +keyword_trigger_metadata_dict = keyword_trigger_metadata_instance.to_dict() +# create an instance of KeywordTriggerMetadata from a dict +keyword_trigger_metadata_from_dict = KeywordTriggerMetadata.from_dict(keyword_trigger_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordTriggerMetadataResponse.md b/docs/KeywordTriggerMetadataResponse.md new file mode 100644 index 0000000..9f4eb69 --- /dev/null +++ b/docs/KeywordTriggerMetadataResponse.md @@ -0,0 +1,31 @@ +# KeywordTriggerMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword_filter** | **List[str]** | | +**regex_patterns** | **List[str]** | | +**allow_list** | **List[str]** | | + +## Example + +```python +from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of KeywordTriggerMetadataResponse from a JSON string +keyword_trigger_metadata_response_instance = KeywordTriggerMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(KeywordTriggerMetadataResponse.to_json()) + +# convert the object into a dict +keyword_trigger_metadata_response_dict = keyword_trigger_metadata_response_instance.to_dict() +# create an instance of KeywordTriggerMetadataResponse from a dict +keyword_trigger_metadata_response_from_dict = KeywordTriggerMetadataResponse.from_dict(keyword_trigger_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordUpsertRequest.md b/docs/KeywordUpsertRequest.md new file mode 100644 index 0000000..d08f6bc --- /dev/null +++ b/docs/KeywordUpsertRequest.md @@ -0,0 +1,36 @@ +# KeywordUpsertRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | +**trigger_metadata** | [**KeywordTriggerMetadata**](KeywordTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of KeywordUpsertRequest from a JSON string +keyword_upsert_request_instance = KeywordUpsertRequest.from_json(json) +# print the JSON string representation of the object +print(KeywordUpsertRequest.to_json()) + +# convert the object into a dict +keyword_upsert_request_dict = keyword_upsert_request_instance.to_dict() +# create an instance of KeywordUpsertRequest from a dict +keyword_upsert_request_from_dict = KeywordUpsertRequest.from_dict(keyword_upsert_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeywordUpsertRequestPartial.md b/docs/KeywordUpsertRequestPartial.md new file mode 100644 index 0000000..93420ca --- /dev/null +++ b/docs/KeywordUpsertRequestPartial.md @@ -0,0 +1,36 @@ +# KeywordUpsertRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**event_type** | **int** | | [optional] +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | [optional] +**trigger_metadata** | [**KeywordTriggerMetadata**](KeywordTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of KeywordUpsertRequestPartial from a JSON string +keyword_upsert_request_partial_instance = KeywordUpsertRequestPartial.from_json(json) +# print the JSON string representation of the object +print(KeywordUpsertRequestPartial.to_json()) + +# convert the object into a dict +keyword_upsert_request_partial_dict = keyword_upsert_request_partial_instance.to_dict() +# create an instance of KeywordUpsertRequestPartial from a dict +keyword_upsert_request_partial_from_dict = KeywordUpsertRequestPartial.from_dict(keyword_upsert_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LaunchActivityInteractionCallbackRequest.md b/docs/LaunchActivityInteractionCallbackRequest.md new file mode 100644 index 0000000..08af85f --- /dev/null +++ b/docs/LaunchActivityInteractionCallbackRequest.md @@ -0,0 +1,29 @@ +# LaunchActivityInteractionCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | + +## Example + +```python +from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LaunchActivityInteractionCallbackRequest from a JSON string +launch_activity_interaction_callback_request_instance = LaunchActivityInteractionCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(LaunchActivityInteractionCallbackRequest.to_json()) + +# convert the object into a dict +launch_activity_interaction_callback_request_dict = launch_activity_interaction_callback_request_instance.to_dict() +# create an instance of LaunchActivityInteractionCallbackRequest from a dict +launch_activity_interaction_callback_request_from_dict = LaunchActivityInteractionCallbackRequest.from_dict(launch_activity_interaction_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LaunchActivityInteractionCallbackResponse.md b/docs/LaunchActivityInteractionCallbackResponse.md new file mode 100644 index 0000000..77ee670 --- /dev/null +++ b/docs/LaunchActivityInteractionCallbackResponse.md @@ -0,0 +1,29 @@ +# LaunchActivityInteractionCallbackResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | + +## Example + +```python +from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LaunchActivityInteractionCallbackResponse from a JSON string +launch_activity_interaction_callback_response_instance = LaunchActivityInteractionCallbackResponse.from_json(json) +# print the JSON string representation of the object +print(LaunchActivityInteractionCallbackResponse.to_json()) + +# convert the object into a dict +launch_activity_interaction_callback_response_dict = launch_activity_interaction_callback_response_instance.to_dict() +# create an instance of LaunchActivityInteractionCallbackResponse from a dict +launch_activity_interaction_callback_response_from_dict = LaunchActivityInteractionCallbackResponse.from_dict(launch_activity_interaction_callback_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListApplicationEmojisResponse.md b/docs/ListApplicationEmojisResponse.md new file mode 100644 index 0000000..a790e90 --- /dev/null +++ b/docs/ListApplicationEmojisResponse.md @@ -0,0 +1,29 @@ +# ListApplicationEmojisResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[EmojiResponse]**](EmojiResponse.md) | | + +## Example + +```python +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListApplicationEmojisResponse from a JSON string +list_application_emojis_response_instance = ListApplicationEmojisResponse.from_json(json) +# print the JSON string representation of the object +print(ListApplicationEmojisResponse.to_json()) + +# convert the object into a dict +list_application_emojis_response_dict = list_application_emojis_response_instance.to_dict() +# create an instance of ListApplicationEmojisResponse from a dict +list_application_emojis_response_from_dict = ListApplicationEmojisResponse.from_dict(list_application_emojis_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListAutoModerationRules200ResponseInner.md b/docs/ListAutoModerationRules200ResponseInner.md new file mode 100644 index 0000000..afb2c1d --- /dev/null +++ b/docs/ListAutoModerationRules200ResponseInner.md @@ -0,0 +1,39 @@ +# ListAutoModerationRules200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListAutoModerationRules200ResponseInner from a JSON string +list_auto_moderation_rules200_response_inner_instance = ListAutoModerationRules200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListAutoModerationRules200ResponseInner.to_json()) + +# convert the object into a dict +list_auto_moderation_rules200_response_inner_dict = list_auto_moderation_rules200_response_inner_instance.to_dict() +# create an instance of ListAutoModerationRules200ResponseInner from a dict +list_auto_moderation_rules200_response_inner_from_dict = ListAutoModerationRules200ResponseInner.from_dict(list_auto_moderation_rules200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListChannelInvites200ResponseInner.md b/docs/ListChannelInvites200ResponseInner.md new file mode 100644 index 0000000..667fcc4 --- /dev/null +++ b/docs/ListChannelInvites200ResponseInner.md @@ -0,0 +1,50 @@ +# ListChannelInvites200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**code** | **str** | | +**inviter** | [**UserResponse**](UserResponse.md) | | [optional] +**max_age** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**expires_at** | **datetime** | | [optional] +**friends_count** | **int** | | [optional] +**channel** | [**InviteChannelResponse**](InviteChannelResponse.md) | | [optional] +**is_contact** | **bool** | | [optional] +**uses** | **int** | | [optional] +**max_uses** | **int** | | [optional] +**flags** | **int** | | [optional] +**approximate_member_count** | **int** | | [optional] +**guild** | [**InviteGuildResponse**](InviteGuildResponse.md) | | [optional] +**guild_id** | **str** | | [optional] +**target_type** | **int** | | [optional] +**target_user** | [**UserResponse**](UserResponse.md) | | [optional] +**target_application** | [**InviteApplicationResponse**](InviteApplicationResponse.md) | | [optional] +**guild_scheduled_event** | [**ScheduledEventResponse**](ScheduledEventResponse.md) | | [optional] +**temporary** | **bool** | | [optional] +**approximate_presence_count** | **int** | | [optional] +**is_nickname_changeable** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListChannelInvites200ResponseInner from a JSON string +list_channel_invites200_response_inner_instance = ListChannelInvites200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListChannelInvites200ResponseInner.to_json()) + +# convert the object into a dict +list_channel_invites200_response_inner_dict = list_channel_invites200_response_inner_instance.to_dict() +# create an instance of ListChannelInvites200ResponseInner from a dict +list_channel_invites200_response_inner_from_dict = ListChannelInvites200ResponseInner.from_dict(list_channel_invites200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListChannelWebhooks200ResponseInner.md b/docs/ListChannelWebhooks200ResponseInner.md new file mode 100644 index 0000000..a298ea5 --- /dev/null +++ b/docs/ListChannelWebhooks200ResponseInner.md @@ -0,0 +1,40 @@ +# ListChannelWebhooks200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | [optional] +**avatar** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**id** | **str** | | +**name** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**source_guild** | [**WebhookSourceGuildResponse**](WebhookSourceGuildResponse.md) | | [optional] +**source_channel** | [**WebhookSourceChannelResponse**](WebhookSourceChannelResponse.md) | | [optional] +**token** | **str** | | [optional] +**url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListChannelWebhooks200ResponseInner from a JSON string +list_channel_webhooks200_response_inner_instance = ListChannelWebhooks200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListChannelWebhooks200ResponseInner.to_json()) + +# convert the object into a dict +list_channel_webhooks200_response_inner_dict = list_channel_webhooks200_response_inner_instance.to_dict() +# create an instance of ListChannelWebhooks200ResponseInner from a dict +list_channel_webhooks200_response_inner_from_dict = ListChannelWebhooks200ResponseInner.from_dict(list_channel_webhooks200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListGuildIntegrations200ResponseInner.md b/docs/ListGuildIntegrations200ResponseInner.md new file mode 100644 index 0000000..de4e728 --- /dev/null +++ b/docs/ListGuildIntegrations200ResponseInner.md @@ -0,0 +1,44 @@ +# ListGuildIntegrations200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**enabled** | **bool** | | [optional] +**id** | **str** | | +**application** | [**IntegrationApplicationResponse**](IntegrationApplicationResponse.md) | | +**scopes** | **List[str]** | | +**user** | [**UserResponse**](UserResponse.md) | | +**revoked** | **bool** | | [optional] +**expire_behavior** | **int** | | [optional] +**expire_grace_period** | **int** | | [optional] +**subscriber_count** | **int** | | [optional] +**synced_at** | **datetime** | | [optional] +**role_id** | **str** | | [optional] +**syncing** | **bool** | | [optional] +**enable_emoticons** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGuildIntegrations200ResponseInner from a JSON string +list_guild_integrations200_response_inner_instance = ListGuildIntegrations200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListGuildIntegrations200ResponseInner.to_json()) + +# convert the object into a dict +list_guild_integrations200_response_inner_dict = list_guild_integrations200_response_inner_instance.to_dict() +# create an instance of ListGuildIntegrations200ResponseInner from a dict +list_guild_integrations200_response_inner_from_dict = ListGuildIntegrations200ResponseInner.from_dict(list_guild_integrations200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListGuildScheduledEvents200ResponseInner.md b/docs/ListGuildScheduledEvents200ResponseInner.md new file mode 100644 index 0000000..8f7c886 --- /dev/null +++ b/docs/ListGuildScheduledEvents200ResponseInner.md @@ -0,0 +1,45 @@ +# ListGuildScheduledEvents200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**creator_id** | **str** | | [optional] +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**status** | **int** | | +**entity_type** | **int** | | +**entity_id** | **str** | | [optional] +**user_count** | **int** | | [optional] +**privacy_level** | **object** | | +**user_rsvp** | [**ScheduledEventUserResponse**](ScheduledEventUserResponse.md) | | [optional] +**entity_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGuildScheduledEvents200ResponseInner from a JSON string +list_guild_scheduled_events200_response_inner_instance = ListGuildScheduledEvents200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListGuildScheduledEvents200ResponseInner.to_json()) + +# convert the object into a dict +list_guild_scheduled_events200_response_inner_dict = list_guild_scheduled_events200_response_inner_instance.to_dict() +# create an instance of ListGuildScheduledEvents200ResponseInner from a dict +list_guild_scheduled_events200_response_inner_from_dict = ListGuildScheduledEvents200ResponseInner.from_dict(list_guild_scheduled_events200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListGuildSoundboardSoundsResponse.md b/docs/ListGuildSoundboardSoundsResponse.md new file mode 100644 index 0000000..a848f7e --- /dev/null +++ b/docs/ListGuildSoundboardSoundsResponse.md @@ -0,0 +1,29 @@ +# ListGuildSoundboardSoundsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[SoundboardSoundResponse]**](SoundboardSoundResponse.md) | | + +## Example + +```python +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListGuildSoundboardSoundsResponse from a JSON string +list_guild_soundboard_sounds_response_instance = ListGuildSoundboardSoundsResponse.from_json(json) +# print the JSON string representation of the object +print(ListGuildSoundboardSoundsResponse.to_json()) + +# convert the object into a dict +list_guild_soundboard_sounds_response_dict = list_guild_soundboard_sounds_response_instance.to_dict() +# create an instance of ListGuildSoundboardSoundsResponse from a dict +list_guild_soundboard_sounds_response_from_dict = ListGuildSoundboardSoundsResponse.from_dict(list_guild_soundboard_sounds_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LobbyMemberRequest.md b/docs/LobbyMemberRequest.md new file mode 100644 index 0000000..4bba081 --- /dev/null +++ b/docs/LobbyMemberRequest.md @@ -0,0 +1,31 @@ +# LobbyMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**metadata** | **Dict[str, str]** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.lobby_member_request import LobbyMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LobbyMemberRequest from a JSON string +lobby_member_request_instance = LobbyMemberRequest.from_json(json) +# print the JSON string representation of the object +print(LobbyMemberRequest.to_json()) + +# convert the object into a dict +lobby_member_request_dict = lobby_member_request_instance.to_dict() +# create an instance of LobbyMemberRequest from a dict +lobby_member_request_from_dict = LobbyMemberRequest.from_dict(lobby_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LobbyMemberResponse.md b/docs/LobbyMemberResponse.md new file mode 100644 index 0000000..20f86cd --- /dev/null +++ b/docs/LobbyMemberResponse.md @@ -0,0 +1,31 @@ +# LobbyMemberResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**metadata** | **Dict[str, str]** | | [optional] +**flags** | **int** | | + +## Example + +```python +from dc_rest.models.lobby_member_response import LobbyMemberResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LobbyMemberResponse from a JSON string +lobby_member_response_instance = LobbyMemberResponse.from_json(json) +# print the JSON string representation of the object +print(LobbyMemberResponse.to_json()) + +# convert the object into a dict +lobby_member_response_dict = lobby_member_response_instance.to_dict() +# create an instance of LobbyMemberResponse from a dict +lobby_member_response_from_dict = LobbyMemberResponse.from_dict(lobby_member_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LobbyMessageResponse.md b/docs/LobbyMessageResponse.md new file mode 100644 index 0000000..e48fc03 --- /dev/null +++ b/docs/LobbyMessageResponse.md @@ -0,0 +1,37 @@ +# LobbyMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**content** | **str** | | +**lobby_id** | **str** | | +**channel_id** | **str** | | +**author** | [**UserResponse**](UserResponse.md) | | +**metadata** | **Dict[str, str]** | | [optional] +**flags** | **int** | | +**application_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.lobby_message_response import LobbyMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LobbyMessageResponse from a JSON string +lobby_message_response_instance = LobbyMessageResponse.from_json(json) +# print the JSON string representation of the object +print(LobbyMessageResponse.to_json()) + +# convert the object into a dict +lobby_message_response_dict = lobby_message_response_instance.to_dict() +# create an instance of LobbyMessageResponse from a dict +lobby_message_response_from_dict = LobbyMessageResponse.from_dict(lobby_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LobbyResponse.md b/docs/LobbyResponse.md new file mode 100644 index 0000000..475556f --- /dev/null +++ b/docs/LobbyResponse.md @@ -0,0 +1,33 @@ +# LobbyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**application_id** | **str** | | +**metadata** | **Dict[str, str]** | | [optional] +**members** | [**List[LobbyMemberResponse]**](LobbyMemberResponse.md) | | [optional] +**linked_channel** | [**GuildChannelResponse**](GuildChannelResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.lobby_response import LobbyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LobbyResponse from a JSON string +lobby_response_instance = LobbyResponse.from_json(json) +# print the JSON string representation of the object +print(LobbyResponse.to_json()) + +# convert the object into a dict +lobby_response_dict = lobby_response_instance.to_dict() +# create an instance of LobbyResponse from a dict +lobby_response_from_dict = LobbyResponse.from_dict(lobby_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MLSpamRuleResponse.md b/docs/MLSpamRuleResponse.md new file mode 100644 index 0000000..33253ef --- /dev/null +++ b/docs/MLSpamRuleResponse.md @@ -0,0 +1,39 @@ +# MLSpamRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MLSpamRuleResponse from a JSON string +ml_spam_rule_response_instance = MLSpamRuleResponse.from_json(json) +# print the JSON string representation of the object +print(MLSpamRuleResponse.to_json()) + +# convert the object into a dict +ml_spam_rule_response_dict = ml_spam_rule_response_instance.to_dict() +# create an instance of MLSpamRuleResponse from a dict +ml_spam_rule_response_from_dict = MLSpamRuleResponse.from_dict(ml_spam_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MLSpamUpsertRequest.md b/docs/MLSpamUpsertRequest.md new file mode 100644 index 0000000..d0a1143 --- /dev/null +++ b/docs/MLSpamUpsertRequest.md @@ -0,0 +1,36 @@ +# MLSpamUpsertRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | +**trigger_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MLSpamUpsertRequest from a JSON string +ml_spam_upsert_request_instance = MLSpamUpsertRequest.from_json(json) +# print the JSON string representation of the object +print(MLSpamUpsertRequest.to_json()) + +# convert the object into a dict +ml_spam_upsert_request_dict = ml_spam_upsert_request_instance.to_dict() +# create an instance of MLSpamUpsertRequest from a dict +ml_spam_upsert_request_from_dict = MLSpamUpsertRequest.from_dict(ml_spam_upsert_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MLSpamUpsertRequestPartial.md b/docs/MLSpamUpsertRequestPartial.md new file mode 100644 index 0000000..79dfcab --- /dev/null +++ b/docs/MLSpamUpsertRequestPartial.md @@ -0,0 +1,36 @@ +# MLSpamUpsertRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**event_type** | **int** | | [optional] +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | [optional] +**trigger_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of MLSpamUpsertRequestPartial from a JSON string +ml_spam_upsert_request_partial_instance = MLSpamUpsertRequestPartial.from_json(json) +# print the JSON string representation of the object +print(MLSpamUpsertRequestPartial.to_json()) + +# convert the object into a dict +ml_spam_upsert_request_partial_dict = ml_spam_upsert_request_partial_instance.to_dict() +# create an instance of MLSpamUpsertRequestPartial from a dict +ml_spam_upsert_request_partial_from_dict = MLSpamUpsertRequestPartial.from_dict(ml_spam_upsert_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaGalleryComponentForMessageRequest.md b/docs/MediaGalleryComponentForMessageRequest.md new file mode 100644 index 0000000..47559ea --- /dev/null +++ b/docs/MediaGalleryComponentForMessageRequest.md @@ -0,0 +1,30 @@ +# MediaGalleryComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**items** | [**List[MediaGalleryItemRequest]**](MediaGalleryItemRequest.md) | | + +## Example + +```python +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaGalleryComponentForMessageRequest from a JSON string +media_gallery_component_for_message_request_instance = MediaGalleryComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(MediaGalleryComponentForMessageRequest.to_json()) + +# convert the object into a dict +media_gallery_component_for_message_request_dict = media_gallery_component_for_message_request_instance.to_dict() +# create an instance of MediaGalleryComponentForMessageRequest from a dict +media_gallery_component_for_message_request_from_dict = MediaGalleryComponentForMessageRequest.from_dict(media_gallery_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaGalleryComponentResponse.md b/docs/MediaGalleryComponentResponse.md new file mode 100644 index 0000000..7089ea4 --- /dev/null +++ b/docs/MediaGalleryComponentResponse.md @@ -0,0 +1,31 @@ +# MediaGalleryComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**items** | [**List[MediaGalleryItemResponse]**](MediaGalleryItemResponse.md) | | + +## Example + +```python +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaGalleryComponentResponse from a JSON string +media_gallery_component_response_instance = MediaGalleryComponentResponse.from_json(json) +# print the JSON string representation of the object +print(MediaGalleryComponentResponse.to_json()) + +# convert the object into a dict +media_gallery_component_response_dict = media_gallery_component_response_instance.to_dict() +# create an instance of MediaGalleryComponentResponse from a dict +media_gallery_component_response_from_dict = MediaGalleryComponentResponse.from_dict(media_gallery_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaGalleryItemRequest.md b/docs/MediaGalleryItemRequest.md new file mode 100644 index 0000000..129871d --- /dev/null +++ b/docs/MediaGalleryItemRequest.md @@ -0,0 +1,31 @@ +# MediaGalleryItemRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**spoiler** | **bool** | | [optional] +**media** | [**UnfurledMediaRequest**](UnfurledMediaRequest.md) | | + +## Example + +```python +from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaGalleryItemRequest from a JSON string +media_gallery_item_request_instance = MediaGalleryItemRequest.from_json(json) +# print the JSON string representation of the object +print(MediaGalleryItemRequest.to_json()) + +# convert the object into a dict +media_gallery_item_request_dict = media_gallery_item_request_instance.to_dict() +# create an instance of MediaGalleryItemRequest from a dict +media_gallery_item_request_from_dict = MediaGalleryItemRequest.from_dict(media_gallery_item_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaGalleryItemResponse.md b/docs/MediaGalleryItemResponse.md new file mode 100644 index 0000000..2910f3e --- /dev/null +++ b/docs/MediaGalleryItemResponse.md @@ -0,0 +1,31 @@ +# MediaGalleryItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**media** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**description** | **str** | | [optional] +**spoiler** | **bool** | | + +## Example + +```python +from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaGalleryItemResponse from a JSON string +media_gallery_item_response_instance = MediaGalleryItemResponse.from_json(json) +# print the JSON string representation of the object +print(MediaGalleryItemResponse.to_json()) + +# convert the object into a dict +media_gallery_item_response_dict = media_gallery_item_response_instance.to_dict() +# create an instance of MediaGalleryItemResponse from a dict +media_gallery_item_response_from_dict = MediaGalleryItemResponse.from_dict(media_gallery_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionSpamRuleResponse.md b/docs/MentionSpamRuleResponse.md new file mode 100644 index 0000000..f741b95 --- /dev/null +++ b/docs/MentionSpamRuleResponse.md @@ -0,0 +1,39 @@ +# MentionSpamRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | [**MentionSpamTriggerMetadataResponse**](MentionSpamTriggerMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionSpamRuleResponse from a JSON string +mention_spam_rule_response_instance = MentionSpamRuleResponse.from_json(json) +# print the JSON string representation of the object +print(MentionSpamRuleResponse.to_json()) + +# convert the object into a dict +mention_spam_rule_response_dict = mention_spam_rule_response_instance.to_dict() +# create an instance of MentionSpamRuleResponse from a dict +mention_spam_rule_response_from_dict = MentionSpamRuleResponse.from_dict(mention_spam_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionSpamTriggerMetadata.md b/docs/MentionSpamTriggerMetadata.md new file mode 100644 index 0000000..f5c0027 --- /dev/null +++ b/docs/MentionSpamTriggerMetadata.md @@ -0,0 +1,30 @@ +# MentionSpamTriggerMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mention_total_limit** | **int** | | +**mention_raid_protection_enabled** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionSpamTriggerMetadata from a JSON string +mention_spam_trigger_metadata_instance = MentionSpamTriggerMetadata.from_json(json) +# print the JSON string representation of the object +print(MentionSpamTriggerMetadata.to_json()) + +# convert the object into a dict +mention_spam_trigger_metadata_dict = mention_spam_trigger_metadata_instance.to_dict() +# create an instance of MentionSpamTriggerMetadata from a dict +mention_spam_trigger_metadata_from_dict = MentionSpamTriggerMetadata.from_dict(mention_spam_trigger_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionSpamTriggerMetadataResponse.md b/docs/MentionSpamTriggerMetadataResponse.md new file mode 100644 index 0000000..cc808db --- /dev/null +++ b/docs/MentionSpamTriggerMetadataResponse.md @@ -0,0 +1,30 @@ +# MentionSpamTriggerMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mention_total_limit** | **int** | | +**mention_raid_protection_enabled** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionSpamTriggerMetadataResponse from a JSON string +mention_spam_trigger_metadata_response_instance = MentionSpamTriggerMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(MentionSpamTriggerMetadataResponse.to_json()) + +# convert the object into a dict +mention_spam_trigger_metadata_response_dict = mention_spam_trigger_metadata_response_instance.to_dict() +# create an instance of MentionSpamTriggerMetadataResponse from a dict +mention_spam_trigger_metadata_response_from_dict = MentionSpamTriggerMetadataResponse.from_dict(mention_spam_trigger_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionSpamUpsertRequest.md b/docs/MentionSpamUpsertRequest.md new file mode 100644 index 0000000..32edbff --- /dev/null +++ b/docs/MentionSpamUpsertRequest.md @@ -0,0 +1,36 @@ +# MentionSpamUpsertRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | +**trigger_metadata** | [**MentionSpamTriggerMetadata**](MentionSpamTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionSpamUpsertRequest from a JSON string +mention_spam_upsert_request_instance = MentionSpamUpsertRequest.from_json(json) +# print the JSON string representation of the object +print(MentionSpamUpsertRequest.to_json()) + +# convert the object into a dict +mention_spam_upsert_request_dict = mention_spam_upsert_request_instance.to_dict() +# create an instance of MentionSpamUpsertRequest from a dict +mention_spam_upsert_request_from_dict = MentionSpamUpsertRequest.from_dict(mention_spam_upsert_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionSpamUpsertRequestPartial.md b/docs/MentionSpamUpsertRequestPartial.md new file mode 100644 index 0000000..231568a --- /dev/null +++ b/docs/MentionSpamUpsertRequestPartial.md @@ -0,0 +1,36 @@ +# MentionSpamUpsertRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**event_type** | **int** | | [optional] +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | [optional] +**trigger_metadata** | [**MentionSpamTriggerMetadata**](MentionSpamTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionSpamUpsertRequestPartial from a JSON string +mention_spam_upsert_request_partial_instance = MentionSpamUpsertRequestPartial.from_json(json) +# print the JSON string representation of the object +print(MentionSpamUpsertRequestPartial.to_json()) + +# convert the object into a dict +mention_spam_upsert_request_partial_dict = mention_spam_upsert_request_partial_instance.to_dict() +# create an instance of MentionSpamUpsertRequestPartial from a dict +mention_spam_upsert_request_partial_from_dict = MentionSpamUpsertRequestPartial.from_dict(mention_spam_upsert_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionableSelectComponentForMessageRequest.md b/docs/MentionableSelectComponentForMessageRequest.md new file mode 100644 index 0000000..b54cc01 --- /dev/null +++ b/docs/MentionableSelectComponentForMessageRequest.md @@ -0,0 +1,35 @@ +# MentionableSelectComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[MentionableSelectComponentForMessageRequestDefaultValuesInner]**](MentionableSelectComponentForMessageRequestDefaultValuesInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionableSelectComponentForMessageRequest from a JSON string +mentionable_select_component_for_message_request_instance = MentionableSelectComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(MentionableSelectComponentForMessageRequest.to_json()) + +# convert the object into a dict +mentionable_select_component_for_message_request_dict = mentionable_select_component_for_message_request_instance.to_dict() +# create an instance of MentionableSelectComponentForMessageRequest from a dict +mentionable_select_component_for_message_request_from_dict = MentionableSelectComponentForMessageRequest.from_dict(mentionable_select_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md b/docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md new file mode 100644 index 0000000..dbee508 --- /dev/null +++ b/docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md @@ -0,0 +1,30 @@ +# MentionableSelectComponentForMessageRequestDefaultValuesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionableSelectComponentForMessageRequestDefaultValuesInner from a JSON string +mentionable_select_component_for_message_request_default_values_inner_instance = MentionableSelectComponentForMessageRequestDefaultValuesInner.from_json(json) +# print the JSON string representation of the object +print(MentionableSelectComponentForMessageRequestDefaultValuesInner.to_json()) + +# convert the object into a dict +mentionable_select_component_for_message_request_default_values_inner_dict = mentionable_select_component_for_message_request_default_values_inner_instance.to_dict() +# create an instance of MentionableSelectComponentForMessageRequestDefaultValuesInner from a dict +mentionable_select_component_for_message_request_default_values_inner_from_dict = MentionableSelectComponentForMessageRequestDefaultValuesInner.from_dict(mentionable_select_component_for_message_request_default_values_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionableSelectComponentResponse.md b/docs/MentionableSelectComponentResponse.md new file mode 100644 index 0000000..0a8f971 --- /dev/null +++ b/docs/MentionableSelectComponentResponse.md @@ -0,0 +1,36 @@ +# MentionableSelectComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[MentionableSelectComponentResponseDefaultValuesInner]**](MentionableSelectComponentResponseDefaultValuesInner.md) | | [optional] + +## Example + +```python +from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionableSelectComponentResponse from a JSON string +mentionable_select_component_response_instance = MentionableSelectComponentResponse.from_json(json) +# print the JSON string representation of the object +print(MentionableSelectComponentResponse.to_json()) + +# convert the object into a dict +mentionable_select_component_response_dict = mentionable_select_component_response_instance.to_dict() +# create an instance of MentionableSelectComponentResponse from a dict +mentionable_select_component_response_from_dict = MentionableSelectComponentResponse.from_dict(mentionable_select_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MentionableSelectComponentResponseDefaultValuesInner.md b/docs/MentionableSelectComponentResponseDefaultValuesInner.md new file mode 100644 index 0000000..987f7c7 --- /dev/null +++ b/docs/MentionableSelectComponentResponseDefaultValuesInner.md @@ -0,0 +1,30 @@ +# MentionableSelectComponentResponseDefaultValuesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of MentionableSelectComponentResponseDefaultValuesInner from a JSON string +mentionable_select_component_response_default_values_inner_instance = MentionableSelectComponentResponseDefaultValuesInner.from_json(json) +# print the JSON string representation of the object +print(MentionableSelectComponentResponseDefaultValuesInner.to_json()) + +# convert the object into a dict +mentionable_select_component_response_default_values_inner_dict = mentionable_select_component_response_default_values_inner_instance.to_dict() +# create an instance of MentionableSelectComponentResponseDefaultValuesInner from a dict +mentionable_select_component_response_default_values_inner_from_dict = MentionableSelectComponentResponseDefaultValuesInner.from_dict(mentionable_select_component_response_default_values_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageAllowedMentionsRequest.md b/docs/MessageAllowedMentionsRequest.md new file mode 100644 index 0000000..2b085a5 --- /dev/null +++ b/docs/MessageAllowedMentionsRequest.md @@ -0,0 +1,32 @@ +# MessageAllowedMentionsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parse** | **List[Optional[str]]** | | [optional] +**users** | **List[Optional[str]]** | | [optional] +**roles** | **List[Optional[str]]** | | [optional] +**replied_user** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageAllowedMentionsRequest from a JSON string +message_allowed_mentions_request_instance = MessageAllowedMentionsRequest.from_json(json) +# print the JSON string representation of the object +print(MessageAllowedMentionsRequest.to_json()) + +# convert the object into a dict +message_allowed_mentions_request_dict = message_allowed_mentions_request_instance.to_dict() +# create an instance of MessageAllowedMentionsRequest from a dict +message_allowed_mentions_request_from_dict = MessageAllowedMentionsRequest.from_dict(message_allowed_mentions_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageAttachmentRequest.md b/docs/MessageAttachmentRequest.md new file mode 100644 index 0000000..eaddd93 --- /dev/null +++ b/docs/MessageAttachmentRequest.md @@ -0,0 +1,35 @@ +# MessageAttachmentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**filename** | **str** | | [optional] +**description** | **str** | | [optional] +**duration_secs** | **float** | | [optional] +**waveform** | **str** | | [optional] +**title** | **str** | | [optional] +**is_remix** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.message_attachment_request import MessageAttachmentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageAttachmentRequest from a JSON string +message_attachment_request_instance = MessageAttachmentRequest.from_json(json) +# print the JSON string representation of the object +print(MessageAttachmentRequest.to_json()) + +# convert the object into a dict +message_attachment_request_dict = message_attachment_request_instance.to_dict() +# create an instance of MessageAttachmentRequest from a dict +message_attachment_request_from_dict = MessageAttachmentRequest.from_dict(message_attachment_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageAttachmentResponse.md b/docs/MessageAttachmentResponse.md new file mode 100644 index 0000000..1d74d5e --- /dev/null +++ b/docs/MessageAttachmentResponse.md @@ -0,0 +1,44 @@ +# MessageAttachmentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**filename** | **str** | | +**size** | **int** | | +**url** | **str** | | +**proxy_url** | **str** | | +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**duration_secs** | **float** | | [optional] +**waveform** | **str** | | [optional] +**description** | **str** | | [optional] +**content_type** | **str** | | [optional] +**ephemeral** | **bool** | | [optional] +**title** | **str** | | [optional] +**application** | [**ApplicationResponse**](ApplicationResponse.md) | | [optional] +**clip_created_at** | **datetime** | | [optional] +**clip_participants** | [**List[UserResponse]**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.message_attachment_response import MessageAttachmentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageAttachmentResponse from a JSON string +message_attachment_response_instance = MessageAttachmentResponse.from_json(json) +# print the JSON string representation of the object +print(MessageAttachmentResponse.to_json()) + +# convert the object into a dict +message_attachment_response_dict = message_attachment_response_instance.to_dict() +# create an instance of MessageAttachmentResponse from a dict +message_attachment_response_from_dict = MessageAttachmentResponse.from_dict(message_attachment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageCallResponse.md b/docs/MessageCallResponse.md new file mode 100644 index 0000000..26e2f18 --- /dev/null +++ b/docs/MessageCallResponse.md @@ -0,0 +1,30 @@ +# MessageCallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ended_timestamp** | **datetime** | | [optional] +**participants** | **List[str]** | | + +## Example + +```python +from dc_rest.models.message_call_response import MessageCallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageCallResponse from a JSON string +message_call_response_instance = MessageCallResponse.from_json(json) +# print the JSON string representation of the object +print(MessageCallResponse.to_json()) + +# convert the object into a dict +message_call_response_dict = message_call_response_instance.to_dict() +# create an instance of MessageCallResponse from a dict +message_call_response_from_dict = MessageCallResponse.from_dict(message_call_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageComponentInteractionMetadataResponse.md b/docs/MessageComponentInteractionMetadataResponse.md new file mode 100644 index 0000000..7f1e26a --- /dev/null +++ b/docs/MessageComponentInteractionMetadataResponse.md @@ -0,0 +1,34 @@ +# MessageComponentInteractionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**authorizing_integration_owners** | **Dict[str, str]** | | +**original_response_message_id** | **str** | | [optional] +**interacted_message_id** | **str** | | + +## Example + +```python +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageComponentInteractionMetadataResponse from a JSON string +message_component_interaction_metadata_response_instance = MessageComponentInteractionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(MessageComponentInteractionMetadataResponse.to_json()) + +# convert the object into a dict +message_component_interaction_metadata_response_dict = message_component_interaction_metadata_response_instance.to_dict() +# create an instance of MessageComponentInteractionMetadataResponse from a dict +message_component_interaction_metadata_response_from_dict = MessageComponentInteractionMetadataResponse.from_dict(message_component_interaction_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageCreateRequest.md b/docs/MessageCreateRequest.md new file mode 100644 index 0000000..740f190 --- /dev/null +++ b/docs/MessageCreateRequest.md @@ -0,0 +1,41 @@ +# MessageCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**sticker_ids** | **List[str]** | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**flags** | **int** | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**confetti_potion** | **object** | | [optional] +**message_reference** | [**MessageReferenceRequest**](MessageReferenceRequest.md) | | [optional] +**nonce** | [**BasicMessageResponseNonce**](BasicMessageResponseNonce.md) | | [optional] +**enforce_nonce** | **bool** | | [optional] +**tts** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.message_create_request import MessageCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageCreateRequest from a JSON string +message_create_request_instance = MessageCreateRequest.from_json(json) +# print the JSON string representation of the object +print(MessageCreateRequest.to_json()) + +# convert the object into a dict +message_create_request_dict = message_create_request_instance.to_dict() +# create an instance of MessageCreateRequest from a dict +message_create_request_from_dict = MessageCreateRequest.from_dict(message_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEditRequestPartial.md b/docs/MessageEditRequestPartial.md new file mode 100644 index 0000000..f3766e1 --- /dev/null +++ b/docs/MessageEditRequestPartial.md @@ -0,0 +1,35 @@ +# MessageEditRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**flags** | **int** | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**sticker_ids** | **List[str]** | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEditRequestPartial from a JSON string +message_edit_request_partial_instance = MessageEditRequestPartial.from_json(json) +# print the JSON string representation of the object +print(MessageEditRequestPartial.to_json()) + +# convert the object into a dict +message_edit_request_partial_dict = message_edit_request_partial_instance.to_dict() +# create an instance of MessageEditRequestPartial from a dict +message_edit_request_partial_from_dict = MessageEditRequestPartial.from_dict(message_edit_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedAuthorResponse.md b/docs/MessageEmbedAuthorResponse.md new file mode 100644 index 0000000..fac87f8 --- /dev/null +++ b/docs/MessageEmbedAuthorResponse.md @@ -0,0 +1,32 @@ +# MessageEmbedAuthorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**url** | **str** | | [optional] +**icon_url** | **str** | | [optional] +**proxy_icon_url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedAuthorResponse from a JSON string +message_embed_author_response_instance = MessageEmbedAuthorResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedAuthorResponse.to_json()) + +# convert the object into a dict +message_embed_author_response_dict = message_embed_author_response_instance.to_dict() +# create an instance of MessageEmbedAuthorResponse from a dict +message_embed_author_response_from_dict = MessageEmbedAuthorResponse.from_dict(message_embed_author_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedFieldResponse.md b/docs/MessageEmbedFieldResponse.md new file mode 100644 index 0000000..eac11f3 --- /dev/null +++ b/docs/MessageEmbedFieldResponse.md @@ -0,0 +1,31 @@ +# MessageEmbedFieldResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | | +**inline** | **bool** | | + +## Example + +```python +from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedFieldResponse from a JSON string +message_embed_field_response_instance = MessageEmbedFieldResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedFieldResponse.to_json()) + +# convert the object into a dict +message_embed_field_response_dict = message_embed_field_response_instance.to_dict() +# create an instance of MessageEmbedFieldResponse from a dict +message_embed_field_response_from_dict = MessageEmbedFieldResponse.from_dict(message_embed_field_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedFooterResponse.md b/docs/MessageEmbedFooterResponse.md new file mode 100644 index 0000000..6750f16 --- /dev/null +++ b/docs/MessageEmbedFooterResponse.md @@ -0,0 +1,31 @@ +# MessageEmbedFooterResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | +**icon_url** | **str** | | [optional] +**proxy_icon_url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedFooterResponse from a JSON string +message_embed_footer_response_instance = MessageEmbedFooterResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedFooterResponse.to_json()) + +# convert the object into a dict +message_embed_footer_response_dict = message_embed_footer_response_instance.to_dict() +# create an instance of MessageEmbedFooterResponse from a dict +message_embed_footer_response_from_dict = MessageEmbedFooterResponse.from_dict(message_embed_footer_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedImageResponse.md b/docs/MessageEmbedImageResponse.md new file mode 100644 index 0000000..386c1b9 --- /dev/null +++ b/docs/MessageEmbedImageResponse.md @@ -0,0 +1,37 @@ +# MessageEmbedImageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**proxy_url** | **str** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**content_type** | **str** | | [optional] +**placeholder** | **str** | | [optional] +**placeholder_version** | **int** | | [optional] +**description** | **str** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedImageResponse from a JSON string +message_embed_image_response_instance = MessageEmbedImageResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedImageResponse.to_json()) + +# convert the object into a dict +message_embed_image_response_dict = message_embed_image_response_instance.to_dict() +# create an instance of MessageEmbedImageResponse from a dict +message_embed_image_response_from_dict = MessageEmbedImageResponse.from_dict(message_embed_image_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedProviderResponse.md b/docs/MessageEmbedProviderResponse.md new file mode 100644 index 0000000..bb739e0 --- /dev/null +++ b/docs/MessageEmbedProviderResponse.md @@ -0,0 +1,30 @@ +# MessageEmbedProviderResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedProviderResponse from a JSON string +message_embed_provider_response_instance = MessageEmbedProviderResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedProviderResponse.to_json()) + +# convert the object into a dict +message_embed_provider_response_dict = message_embed_provider_response_instance.to_dict() +# create an instance of MessageEmbedProviderResponse from a dict +message_embed_provider_response_from_dict = MessageEmbedProviderResponse.from_dict(message_embed_provider_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedResponse.md b/docs/MessageEmbedResponse.md new file mode 100644 index 0000000..a7097d2 --- /dev/null +++ b/docs/MessageEmbedResponse.md @@ -0,0 +1,41 @@ +# MessageEmbedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**url** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**color** | **int** | | [optional] +**timestamp** | **datetime** | | [optional] +**fields** | [**List[MessageEmbedFieldResponse]**](MessageEmbedFieldResponse.md) | | [optional] +**author** | [**MessageEmbedAuthorResponse**](MessageEmbedAuthorResponse.md) | | [optional] +**provider** | [**MessageEmbedProviderResponse**](MessageEmbedProviderResponse.md) | | [optional] +**image** | [**MessageEmbedImageResponse**](MessageEmbedImageResponse.md) | | [optional] +**thumbnail** | [**MessageEmbedImageResponse**](MessageEmbedImageResponse.md) | | [optional] +**video** | [**MessageEmbedVideoResponse**](MessageEmbedVideoResponse.md) | | [optional] +**footer** | [**MessageEmbedFooterResponse**](MessageEmbedFooterResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_response import MessageEmbedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedResponse from a JSON string +message_embed_response_instance = MessageEmbedResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedResponse.to_json()) + +# convert the object into a dict +message_embed_response_dict = message_embed_response_instance.to_dict() +# create an instance of MessageEmbedResponse from a dict +message_embed_response_from_dict = MessageEmbedResponse.from_dict(message_embed_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageEmbedVideoResponse.md b/docs/MessageEmbedVideoResponse.md new file mode 100644 index 0000000..c87487f --- /dev/null +++ b/docs/MessageEmbedVideoResponse.md @@ -0,0 +1,37 @@ +# MessageEmbedVideoResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**proxy_url** | **str** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**content_type** | **str** | | [optional] +**placeholder** | **str** | | [optional] +**placeholder_version** | **int** | | [optional] +**description** | **str** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageEmbedVideoResponse from a JSON string +message_embed_video_response_instance = MessageEmbedVideoResponse.from_json(json) +# print the JSON string representation of the object +print(MessageEmbedVideoResponse.to_json()) + +# convert the object into a dict +message_embed_video_response_dict = message_embed_video_response_instance.to_dict() +# create an instance of MessageEmbedVideoResponse from a dict +message_embed_video_response_from_dict = MessageEmbedVideoResponse.from_dict(message_embed_video_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageInteractionResponse.md b/docs/MessageInteractionResponse.md new file mode 100644 index 0000000..ba850d9 --- /dev/null +++ b/docs/MessageInteractionResponse.md @@ -0,0 +1,33 @@ +# MessageInteractionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**name** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**name_localized** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.message_interaction_response import MessageInteractionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageInteractionResponse from a JSON string +message_interaction_response_instance = MessageInteractionResponse.from_json(json) +# print the JSON string representation of the object +print(MessageInteractionResponse.to_json()) + +# convert the object into a dict +message_interaction_response_dict = message_interaction_response_instance.to_dict() +# create an instance of MessageInteractionResponse from a dict +message_interaction_response_from_dict = MessageInteractionResponse.from_dict(message_interaction_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageMentionChannelResponse.md b/docs/MessageMentionChannelResponse.md new file mode 100644 index 0000000..a546116 --- /dev/null +++ b/docs/MessageMentionChannelResponse.md @@ -0,0 +1,32 @@ +# MessageMentionChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**type** | **int** | | +**guild_id** | **str** | | + +## Example + +```python +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageMentionChannelResponse from a JSON string +message_mention_channel_response_instance = MessageMentionChannelResponse.from_json(json) +# print the JSON string representation of the object +print(MessageMentionChannelResponse.to_json()) + +# convert the object into a dict +message_mention_channel_response_dict = message_mention_channel_response_instance.to_dict() +# create an instance of MessageMentionChannelResponse from a dict +message_mention_channel_response_from_dict = MessageMentionChannelResponse.from_dict(message_mention_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageReactionCountDetailsResponse.md b/docs/MessageReactionCountDetailsResponse.md new file mode 100644 index 0000000..f4a2b10 --- /dev/null +++ b/docs/MessageReactionCountDetailsResponse.md @@ -0,0 +1,30 @@ +# MessageReactionCountDetailsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**burst** | **int** | | +**normal** | **int** | | + +## Example + +```python +from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageReactionCountDetailsResponse from a JSON string +message_reaction_count_details_response_instance = MessageReactionCountDetailsResponse.from_json(json) +# print the JSON string representation of the object +print(MessageReactionCountDetailsResponse.to_json()) + +# convert the object into a dict +message_reaction_count_details_response_dict = message_reaction_count_details_response_instance.to_dict() +# create an instance of MessageReactionCountDetailsResponse from a dict +message_reaction_count_details_response_from_dict = MessageReactionCountDetailsResponse.from_dict(message_reaction_count_details_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageReactionEmojiResponse.md b/docs/MessageReactionEmojiResponse.md new file mode 100644 index 0000000..4d57dd6 --- /dev/null +++ b/docs/MessageReactionEmojiResponse.md @@ -0,0 +1,31 @@ +# MessageReactionEmojiResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**animated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageReactionEmojiResponse from a JSON string +message_reaction_emoji_response_instance = MessageReactionEmojiResponse.from_json(json) +# print the JSON string representation of the object +print(MessageReactionEmojiResponse.to_json()) + +# convert the object into a dict +message_reaction_emoji_response_dict = message_reaction_emoji_response_instance.to_dict() +# create an instance of MessageReactionEmojiResponse from a dict +message_reaction_emoji_response_from_dict = MessageReactionEmojiResponse.from_dict(message_reaction_emoji_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageReactionResponse.md b/docs/MessageReactionResponse.md new file mode 100644 index 0000000..756f1e5 --- /dev/null +++ b/docs/MessageReactionResponse.md @@ -0,0 +1,34 @@ +# MessageReactionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emoji** | [**MessageReactionEmojiResponse**](MessageReactionEmojiResponse.md) | | +**count** | **int** | | +**count_details** | [**MessageReactionCountDetailsResponse**](MessageReactionCountDetailsResponse.md) | | +**burst_colors** | **List[str]** | | +**me_burst** | **bool** | | +**me** | **bool** | | + +## Example + +```python +from dc_rest.models.message_reaction_response import MessageReactionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageReactionResponse from a JSON string +message_reaction_response_instance = MessageReactionResponse.from_json(json) +# print the JSON string representation of the object +print(MessageReactionResponse.to_json()) + +# convert the object into a dict +message_reaction_response_dict = message_reaction_response_instance.to_dict() +# create an instance of MessageReactionResponse from a dict +message_reaction_response_from_dict = MessageReactionResponse.from_dict(message_reaction_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageReferenceRequest.md b/docs/MessageReferenceRequest.md new file mode 100644 index 0000000..442e896 --- /dev/null +++ b/docs/MessageReferenceRequest.md @@ -0,0 +1,33 @@ +# MessageReferenceRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_id** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**message_id** | **str** | | +**fail_if_not_exists** | **bool** | | [optional] +**type** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.message_reference_request import MessageReferenceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageReferenceRequest from a JSON string +message_reference_request_instance = MessageReferenceRequest.from_json(json) +# print the JSON string representation of the object +print(MessageReferenceRequest.to_json()) + +# convert the object into a dict +message_reference_request_dict = message_reference_request_instance.to_dict() +# create an instance of MessageReferenceRequest from a dict +message_reference_request_from_dict = MessageReferenceRequest.from_dict(message_reference_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageReferenceResponse.md b/docs/MessageReferenceResponse.md new file mode 100644 index 0000000..204ddea --- /dev/null +++ b/docs/MessageReferenceResponse.md @@ -0,0 +1,32 @@ +# MessageReferenceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **object** | | [optional] +**channel_id** | **str** | | +**message_id** | **str** | | [optional] +**guild_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.message_reference_response import MessageReferenceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageReferenceResponse from a JSON string +message_reference_response_instance = MessageReferenceResponse.from_json(json) +# print the JSON string representation of the object +print(MessageReferenceResponse.to_json()) + +# convert the object into a dict +message_reference_response_dict = message_reference_response_instance.to_dict() +# create an instance of MessageReferenceResponse from a dict +message_reference_response_from_dict = MessageReferenceResponse.from_dict(message_reference_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageResponse.md b/docs/MessageResponse.md new file mode 100644 index 0000000..6fe2730 --- /dev/null +++ b/docs/MessageResponse.md @@ -0,0 +1,65 @@ +# MessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**content** | **str** | | +**mentions** | [**List[UserResponse]**](UserResponse.md) | | +**mention_roles** | **List[str]** | | +**attachments** | [**List[MessageAttachmentResponse]**](MessageAttachmentResponse.md) | | +**embeds** | [**List[MessageEmbedResponse]**](MessageEmbedResponse.md) | | +**timestamp** | **datetime** | | +**edited_timestamp** | **datetime** | | [optional] +**flags** | **int** | | +**components** | [**List[BasicMessageResponseComponentsInner]**](BasicMessageResponseComponentsInner.md) | | +**resolved** | [**ResolvedObjectsResponse**](ResolvedObjectsResponse.md) | | [optional] +**stickers** | [**List[GetSticker200Response]**](GetSticker200Response.md) | | [optional] +**sticker_items** | [**List[MessageStickerItemResponse]**](MessageStickerItemResponse.md) | | [optional] +**id** | **str** | | +**channel_id** | **str** | | +**author** | [**UserResponse**](UserResponse.md) | | +**pinned** | **bool** | | +**mention_everyone** | **bool** | | +**tts** | **bool** | | +**call** | [**MessageCallResponse**](MessageCallResponse.md) | | [optional] +**activity** | **object** | | [optional] +**application** | [**BasicApplicationResponse**](BasicApplicationResponse.md) | | [optional] +**application_id** | **str** | | [optional] +**interaction** | [**MessageInteractionResponse**](MessageInteractionResponse.md) | | [optional] +**nonce** | [**BasicMessageResponseNonce**](BasicMessageResponseNonce.md) | | [optional] +**webhook_id** | **str** | | [optional] +**message_reference** | [**MessageReferenceResponse**](MessageReferenceResponse.md) | | [optional] +**thread** | [**ThreadResponse**](ThreadResponse.md) | | [optional] +**mention_channels** | [**List[Optional[MessageMentionChannelResponse]]**](MessageMentionChannelResponse.md) | | [optional] +**role_subscription_data** | [**MessageRoleSubscriptionDataResponse**](MessageRoleSubscriptionDataResponse.md) | | [optional] +**purchase_notification** | [**PurchaseNotificationResponse**](PurchaseNotificationResponse.md) | | [optional] +**position** | **int** | | [optional] +**poll** | [**PollResponse**](PollResponse.md) | | [optional] +**interaction_metadata** | [**BasicMessageResponseInteractionMetadata**](BasicMessageResponseInteractionMetadata.md) | | [optional] +**message_snapshots** | [**List[MessageSnapshotResponse]**](MessageSnapshotResponse.md) | | [optional] +**reactions** | [**List[MessageReactionResponse]**](MessageReactionResponse.md) | | [optional] +**referenced_message** | [**BasicMessageResponse**](BasicMessageResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.message_response import MessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageResponse from a JSON string +message_response_instance = MessageResponse.from_json(json) +# print the JSON string representation of the object +print(MessageResponse.to_json()) + +# convert the object into a dict +message_response_dict = message_response_instance.to_dict() +# create an instance of MessageResponse from a dict +message_response_from_dict = MessageResponse.from_dict(message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageRoleSubscriptionDataResponse.md b/docs/MessageRoleSubscriptionDataResponse.md new file mode 100644 index 0000000..6cc6dcc --- /dev/null +++ b/docs/MessageRoleSubscriptionDataResponse.md @@ -0,0 +1,32 @@ +# MessageRoleSubscriptionDataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_subscription_listing_id** | **str** | | +**tier_name** | **str** | | +**total_months_subscribed** | **int** | | +**is_renewal** | **bool** | | + +## Example + +```python +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageRoleSubscriptionDataResponse from a JSON string +message_role_subscription_data_response_instance = MessageRoleSubscriptionDataResponse.from_json(json) +# print the JSON string representation of the object +print(MessageRoleSubscriptionDataResponse.to_json()) + +# convert the object into a dict +message_role_subscription_data_response_dict = message_role_subscription_data_response_instance.to_dict() +# create an instance of MessageRoleSubscriptionDataResponse from a dict +message_role_subscription_data_response_from_dict = MessageRoleSubscriptionDataResponse.from_dict(message_role_subscription_data_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageSnapshotResponse.md b/docs/MessageSnapshotResponse.md new file mode 100644 index 0000000..3c95c4a --- /dev/null +++ b/docs/MessageSnapshotResponse.md @@ -0,0 +1,29 @@ +# MessageSnapshotResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | [**MinimalContentMessageResponse**](MinimalContentMessageResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageSnapshotResponse from a JSON string +message_snapshot_response_instance = MessageSnapshotResponse.from_json(json) +# print the JSON string representation of the object +print(MessageSnapshotResponse.to_json()) + +# convert the object into a dict +message_snapshot_response_dict = message_snapshot_response_instance.to_dict() +# create an instance of MessageSnapshotResponse from a dict +message_snapshot_response_from_dict = MessageSnapshotResponse.from_dict(message_snapshot_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageStickerItemResponse.md b/docs/MessageStickerItemResponse.md new file mode 100644 index 0000000..5a19c00 --- /dev/null +++ b/docs/MessageStickerItemResponse.md @@ -0,0 +1,31 @@ +# MessageStickerItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**format_type** | **int** | | + +## Example + +```python +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageStickerItemResponse from a JSON string +message_sticker_item_response_instance = MessageStickerItemResponse.from_json(json) +# print the JSON string representation of the object +print(MessageStickerItemResponse.to_json()) + +# convert the object into a dict +message_sticker_item_response_dict = message_sticker_item_response_instance.to_dict() +# create an instance of MessageStickerItemResponse from a dict +message_sticker_item_response_from_dict = MessageStickerItemResponse.from_dict(message_sticker_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MinimalContentMessageResponse.md b/docs/MinimalContentMessageResponse.md new file mode 100644 index 0000000..4e9f492 --- /dev/null +++ b/docs/MinimalContentMessageResponse.md @@ -0,0 +1,41 @@ +# MinimalContentMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**content** | **str** | | +**mentions** | [**List[UserResponse]**](UserResponse.md) | | +**mention_roles** | **List[str]** | | +**attachments** | [**List[MessageAttachmentResponse]**](MessageAttachmentResponse.md) | | +**embeds** | [**List[MessageEmbedResponse]**](MessageEmbedResponse.md) | | +**timestamp** | **datetime** | | +**edited_timestamp** | **datetime** | | [optional] +**flags** | **int** | | +**components** | [**List[BasicMessageResponseComponentsInner]**](BasicMessageResponseComponentsInner.md) | | +**resolved** | [**ResolvedObjectsResponse**](ResolvedObjectsResponse.md) | | [optional] +**stickers** | [**List[GetSticker200Response]**](GetSticker200Response.md) | | [optional] +**sticker_items** | [**List[MessageStickerItemResponse]**](MessageStickerItemResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MinimalContentMessageResponse from a JSON string +minimal_content_message_response_instance = MinimalContentMessageResponse.from_json(json) +# print the JSON string representation of the object +print(MinimalContentMessageResponse.to_json()) + +# convert the object into a dict +minimal_content_message_response_dict = minimal_content_message_response_instance.to_dict() +# create an instance of MinimalContentMessageResponse from a dict +minimal_content_message_response_from_dict = MinimalContentMessageResponse.from_dict(minimal_content_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModalInteractionCallbackRequest.md b/docs/ModalInteractionCallbackRequest.md new file mode 100644 index 0000000..d47876d --- /dev/null +++ b/docs/ModalInteractionCallbackRequest.md @@ -0,0 +1,30 @@ +# ModalInteractionCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**data** | [**ModalInteractionCallbackRequestData**](ModalInteractionCallbackRequestData.md) | | + +## Example + +```python +from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ModalInteractionCallbackRequest from a JSON string +modal_interaction_callback_request_instance = ModalInteractionCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(ModalInteractionCallbackRequest.to_json()) + +# convert the object into a dict +modal_interaction_callback_request_dict = modal_interaction_callback_request_instance.to_dict() +# create an instance of ModalInteractionCallbackRequest from a dict +modal_interaction_callback_request_from_dict = ModalInteractionCallbackRequest.from_dict(modal_interaction_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModalInteractionCallbackRequestData.md b/docs/ModalInteractionCallbackRequestData.md new file mode 100644 index 0000000..5df50d9 --- /dev/null +++ b/docs/ModalInteractionCallbackRequestData.md @@ -0,0 +1,31 @@ +# ModalInteractionCallbackRequestData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_id** | **str** | | +**title** | **str** | | +**components** | [**List[ActionRowComponentForModalRequest]**](ActionRowComponentForModalRequest.md) | | + +## Example + +```python +from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData + +# TODO update the JSON string below +json = "{}" +# create an instance of ModalInteractionCallbackRequestData from a JSON string +modal_interaction_callback_request_data_instance = ModalInteractionCallbackRequestData.from_json(json) +# print the JSON string representation of the object +print(ModalInteractionCallbackRequestData.to_json()) + +# convert the object into a dict +modal_interaction_callback_request_data_dict = modal_interaction_callback_request_data_instance.to_dict() +# create an instance of ModalInteractionCallbackRequestData from a dict +modal_interaction_callback_request_data_from_dict = ModalInteractionCallbackRequestData.from_dict(modal_interaction_callback_request_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModalSubmitInteractionMetadataResponse.md b/docs/ModalSubmitInteractionMetadataResponse.md new file mode 100644 index 0000000..a3aade0 --- /dev/null +++ b/docs/ModalSubmitInteractionMetadataResponse.md @@ -0,0 +1,34 @@ +# ModalSubmitInteractionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**authorizing_integration_owners** | **Dict[str, str]** | | +**original_response_message_id** | **str** | | [optional] +**triggering_interaction_metadata** | [**ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata**](ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md) | | + +## Example + +```python +from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ModalSubmitInteractionMetadataResponse from a JSON string +modal_submit_interaction_metadata_response_instance = ModalSubmitInteractionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(ModalSubmitInteractionMetadataResponse.to_json()) + +# convert the object into a dict +modal_submit_interaction_metadata_response_dict = modal_submit_interaction_metadata_response_instance.to_dict() +# create an instance of ModalSubmitInteractionMetadataResponse from a dict +modal_submit_interaction_metadata_response_from_dict = ModalSubmitInteractionMetadataResponse.from_dict(modal_submit_interaction_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md b/docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md new file mode 100644 index 0000000..8a735a5 --- /dev/null +++ b/docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md @@ -0,0 +1,36 @@ +# ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**authorizing_integration_owners** | **Dict[str, str]** | | +**original_response_message_id** | **str** | | [optional] +**target_user** | [**UserResponse**](UserResponse.md) | | [optional] +**target_message_id** | **str** | | [optional] +**interacted_message_id** | **str** | | + +## Example + +```python +from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata from a JSON string +modal_submit_interaction_metadata_response_triggering_interaction_metadata_instance = ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.from_json(json) +# print the JSON string representation of the object +print(ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.to_json()) + +# convert the object into a dict +modal_submit_interaction_metadata_response_triggering_interaction_metadata_dict = modal_submit_interaction_metadata_response_triggering_interaction_metadata_instance.to_dict() +# create an instance of ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata from a dict +modal_submit_interaction_metadata_response_triggering_interaction_metadata_from_dict = ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.from_dict(modal_submit_interaction_metadata_response_triggering_interaction_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MyGuildResponse.md b/docs/MyGuildResponse.md new file mode 100644 index 0000000..66d9b58 --- /dev/null +++ b/docs/MyGuildResponse.md @@ -0,0 +1,37 @@ +# MyGuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**banner** | **str** | | [optional] +**owner** | **bool** | | +**permissions** | **str** | | +**features** | **List[str]** | | +**approximate_member_count** | **int** | | [optional] +**approximate_presence_count** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.my_guild_response import MyGuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of MyGuildResponse from a JSON string +my_guild_response_instance = MyGuildResponse.from_json(json) +# print the JSON string representation of the object +print(MyGuildResponse.to_json()) + +# convert the object into a dict +my_guild_response_dict = my_guild_response_instance.to_dict() +# create an instance of MyGuildResponse from a dict +my_guild_response_from_dict = MyGuildResponse.from_dict(my_guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewMemberActionResponse.md b/docs/NewMemberActionResponse.md new file mode 100644 index 0000000..91e061b --- /dev/null +++ b/docs/NewMemberActionResponse.md @@ -0,0 +1,34 @@ +# NewMemberActionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | +**action_type** | **int** | | +**title** | **str** | | +**description** | **str** | | +**emoji** | [**SettingsEmojiResponse**](SettingsEmojiResponse.md) | | [optional] +**icon** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.new_member_action_response import NewMemberActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of NewMemberActionResponse from a JSON string +new_member_action_response_instance = NewMemberActionResponse.from_json(json) +# print the JSON string representation of the object +print(NewMemberActionResponse.to_json()) + +# convert the object into a dict +new_member_action_response_dict = new_member_action_response_instance.to_dict() +# create an instance of NewMemberActionResponse from a dict +new_member_action_response_from_dict = NewMemberActionResponse.from_dict(new_member_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2GetAuthorizationResponse.md b/docs/OAuth2GetAuthorizationResponse.md new file mode 100644 index 0000000..2086830 --- /dev/null +++ b/docs/OAuth2GetAuthorizationResponse.md @@ -0,0 +1,32 @@ +# OAuth2GetAuthorizationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application** | [**ApplicationResponse**](ApplicationResponse.md) | | +**expires** | **datetime** | | +**scopes** | **List[str]** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2GetAuthorizationResponse from a JSON string +o_auth2_get_authorization_response_instance = OAuth2GetAuthorizationResponse.from_json(json) +# print the JSON string representation of the object +print(OAuth2GetAuthorizationResponse.to_json()) + +# convert the object into a dict +o_auth2_get_authorization_response_dict = o_auth2_get_authorization_response_instance.to_dict() +# create an instance of OAuth2GetAuthorizationResponse from a dict +o_auth2_get_authorization_response_from_dict = OAuth2GetAuthorizationResponse.from_dict(o_auth2_get_authorization_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2GetKeys.md b/docs/OAuth2GetKeys.md new file mode 100644 index 0000000..39056e5 --- /dev/null +++ b/docs/OAuth2GetKeys.md @@ -0,0 +1,29 @@ +# OAuth2GetKeys + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keys** | [**List[OAuth2Key]**](OAuth2Key.md) | | + +## Example + +```python +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2GetKeys from a JSON string +o_auth2_get_keys_instance = OAuth2GetKeys.from_json(json) +# print the JSON string representation of the object +print(OAuth2GetKeys.to_json()) + +# convert the object into a dict +o_auth2_get_keys_dict = o_auth2_get_keys_instance.to_dict() +# create an instance of OAuth2GetKeys from a dict +o_auth2_get_keys_from_dict = OAuth2GetKeys.from_dict(o_auth2_get_keys_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2GetOpenIDConnectUserInfoResponse.md b/docs/OAuth2GetOpenIDConnectUserInfoResponse.md new file mode 100644 index 0000000..aa0cc21 --- /dev/null +++ b/docs/OAuth2GetOpenIDConnectUserInfoResponse.md @@ -0,0 +1,35 @@ +# OAuth2GetOpenIDConnectUserInfoResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sub** | **str** | | +**email** | **str** | | [optional] +**email_verified** | **bool** | | [optional] +**preferred_username** | **str** | | [optional] +**nickname** | **str** | | [optional] +**picture** | **str** | | [optional] +**locale** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2GetOpenIDConnectUserInfoResponse from a JSON string +o_auth2_get_open_id_connect_user_info_response_instance = OAuth2GetOpenIDConnectUserInfoResponse.from_json(json) +# print the JSON string representation of the object +print(OAuth2GetOpenIDConnectUserInfoResponse.to_json()) + +# convert the object into a dict +o_auth2_get_open_id_connect_user_info_response_dict = o_auth2_get_open_id_connect_user_info_response_instance.to_dict() +# create an instance of OAuth2GetOpenIDConnectUserInfoResponse from a dict +o_auth2_get_open_id_connect_user_info_response_from_dict = OAuth2GetOpenIDConnectUserInfoResponse.from_dict(o_auth2_get_open_id_connect_user_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2Key.md b/docs/OAuth2Key.md new file mode 100644 index 0000000..4b1fc08 --- /dev/null +++ b/docs/OAuth2Key.md @@ -0,0 +1,34 @@ +# OAuth2Key + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kty** | **str** | | +**use** | **str** | | +**kid** | **str** | | +**n** | **str** | | +**e** | **str** | | +**alg** | **str** | | + +## Example + +```python +from dc_rest.models.o_auth2_key import OAuth2Key + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2Key from a JSON string +o_auth2_key_instance = OAuth2Key.from_json(json) +# print the JSON string representation of the object +print(OAuth2Key.to_json()) + +# convert the object into a dict +o_auth2_key_dict = o_auth2_key_instance.to_dict() +# create an instance of OAuth2Key from a dict +o_auth2_key_from_dict = OAuth2Key.from_dict(o_auth2_key_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OnboardingPromptOptionRequest.md b/docs/OnboardingPromptOptionRequest.md new file mode 100644 index 0000000..b1c4c95 --- /dev/null +++ b/docs/OnboardingPromptOptionRequest.md @@ -0,0 +1,36 @@ +# OnboardingPromptOptionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**title** | **str** | | +**description** | **str** | | [optional] +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**emoji_animated** | **bool** | | [optional] +**role_ids** | **List[str]** | | [optional] +**channel_ids** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingPromptOptionRequest from a JSON string +onboarding_prompt_option_request_instance = OnboardingPromptOptionRequest.from_json(json) +# print the JSON string representation of the object +print(OnboardingPromptOptionRequest.to_json()) + +# convert the object into a dict +onboarding_prompt_option_request_dict = onboarding_prompt_option_request_instance.to_dict() +# create an instance of OnboardingPromptOptionRequest from a dict +onboarding_prompt_option_request_from_dict = OnboardingPromptOptionRequest.from_dict(onboarding_prompt_option_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OnboardingPromptOptionResponse.md b/docs/OnboardingPromptOptionResponse.md new file mode 100644 index 0000000..75fbe7e --- /dev/null +++ b/docs/OnboardingPromptOptionResponse.md @@ -0,0 +1,34 @@ +# OnboardingPromptOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**title** | **str** | | +**description** | **str** | | +**emoji** | [**SettingsEmojiResponse**](SettingsEmojiResponse.md) | | +**role_ids** | **List[str]** | | +**channel_ids** | **List[str]** | | + +## Example + +```python +from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingPromptOptionResponse from a JSON string +onboarding_prompt_option_response_instance = OnboardingPromptOptionResponse.from_json(json) +# print the JSON string representation of the object +print(OnboardingPromptOptionResponse.to_json()) + +# convert the object into a dict +onboarding_prompt_option_response_dict = onboarding_prompt_option_response_instance.to_dict() +# create an instance of OnboardingPromptOptionResponse from a dict +onboarding_prompt_option_response_from_dict = OnboardingPromptOptionResponse.from_dict(onboarding_prompt_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OnboardingPromptResponse.md b/docs/OnboardingPromptResponse.md new file mode 100644 index 0000000..d2746cc --- /dev/null +++ b/docs/OnboardingPromptResponse.md @@ -0,0 +1,35 @@ +# OnboardingPromptResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**title** | **str** | | +**options** | [**List[OnboardingPromptOptionResponse]**](OnboardingPromptOptionResponse.md) | | +**single_select** | **bool** | | +**required** | **bool** | | +**in_onboarding** | **bool** | | +**type** | **int** | | + +## Example + +```python +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OnboardingPromptResponse from a JSON string +onboarding_prompt_response_instance = OnboardingPromptResponse.from_json(json) +# print the JSON string representation of the object +print(OnboardingPromptResponse.to_json()) + +# convert the object into a dict +onboarding_prompt_response_dict = onboarding_prompt_response_instance.to_dict() +# create an instance of OnboardingPromptResponse from a dict +onboarding_prompt_response_from_dict = OnboardingPromptResponse.from_dict(onboarding_prompt_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartialDiscordIntegrationResponse.md b/docs/PartialDiscordIntegrationResponse.md new file mode 100644 index 0000000..0aa3572 --- /dev/null +++ b/docs/PartialDiscordIntegrationResponse.md @@ -0,0 +1,33 @@ +# PartialDiscordIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] +**application_id** | **str** | | + +## Example + +```python +from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialDiscordIntegrationResponse from a JSON string +partial_discord_integration_response_instance = PartialDiscordIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(PartialDiscordIntegrationResponse.to_json()) + +# convert the object into a dict +partial_discord_integration_response_dict = partial_discord_integration_response_instance.to_dict() +# create an instance of PartialDiscordIntegrationResponse from a dict +partial_discord_integration_response_from_dict = PartialDiscordIntegrationResponse.from_dict(partial_discord_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartialExternalConnectionIntegrationResponse.md b/docs/PartialExternalConnectionIntegrationResponse.md new file mode 100644 index 0000000..4a10397 --- /dev/null +++ b/docs/PartialExternalConnectionIntegrationResponse.md @@ -0,0 +1,32 @@ +# PartialExternalConnectionIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialExternalConnectionIntegrationResponse from a JSON string +partial_external_connection_integration_response_instance = PartialExternalConnectionIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(PartialExternalConnectionIntegrationResponse.to_json()) + +# convert the object into a dict +partial_external_connection_integration_response_dict = partial_external_connection_integration_response_instance.to_dict() +# create an instance of PartialExternalConnectionIntegrationResponse from a dict +partial_external_connection_integration_response_from_dict = PartialExternalConnectionIntegrationResponse.from_dict(partial_external_connection_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartialGuildSubscriptionIntegrationResponse.md b/docs/PartialGuildSubscriptionIntegrationResponse.md new file mode 100644 index 0000000..0e25ee8 --- /dev/null +++ b/docs/PartialGuildSubscriptionIntegrationResponse.md @@ -0,0 +1,32 @@ +# PartialGuildSubscriptionIntegrationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**name** | **str** | | [optional] +**account** | [**AccountResponse**](AccountResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialGuildSubscriptionIntegrationResponse from a JSON string +partial_guild_subscription_integration_response_instance = PartialGuildSubscriptionIntegrationResponse.from_json(json) +# print the JSON string representation of the object +print(PartialGuildSubscriptionIntegrationResponse.to_json()) + +# convert the object into a dict +partial_guild_subscription_integration_response_dict = partial_guild_subscription_integration_response_instance.to_dict() +# create an instance of PartialGuildSubscriptionIntegrationResponse from a dict +partial_guild_subscription_integration_response_from_dict = PartialGuildSubscriptionIntegrationResponse.from_dict(partial_guild_subscription_integration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartnerSdkUnmergeProvisionalAccountRequest.md b/docs/PartnerSdkUnmergeProvisionalAccountRequest.md new file mode 100644 index 0000000..90abe44 --- /dev/null +++ b/docs/PartnerSdkUnmergeProvisionalAccountRequest.md @@ -0,0 +1,32 @@ +# PartnerSdkUnmergeProvisionalAccountRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | **str** | | +**client_secret** | **str** | | [optional] +**external_auth_token** | **str** | | +**external_auth_type** | **str** | | + +## Example + +```python +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PartnerSdkUnmergeProvisionalAccountRequest from a JSON string +partner_sdk_unmerge_provisional_account_request_instance = PartnerSdkUnmergeProvisionalAccountRequest.from_json(json) +# print the JSON string representation of the object +print(PartnerSdkUnmergeProvisionalAccountRequest.to_json()) + +# convert the object into a dict +partner_sdk_unmerge_provisional_account_request_dict = partner_sdk_unmerge_provisional_account_request_instance.to_dict() +# create an instance of PartnerSdkUnmergeProvisionalAccountRequest from a dict +partner_sdk_unmerge_provisional_account_request_from_dict = PartnerSdkUnmergeProvisionalAccountRequest.from_dict(partner_sdk_unmerge_provisional_account_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PinnedMessageResponse.md b/docs/PinnedMessageResponse.md new file mode 100644 index 0000000..107194c --- /dev/null +++ b/docs/PinnedMessageResponse.md @@ -0,0 +1,30 @@ +# PinnedMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pinned_at** | **datetime** | | +**message** | [**MessageResponse**](MessageResponse.md) | | + +## Example + +```python +from dc_rest.models.pinned_message_response import PinnedMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PinnedMessageResponse from a JSON string +pinned_message_response_instance = PinnedMessageResponse.from_json(json) +# print the JSON string representation of the object +print(PinnedMessageResponse.to_json()) + +# convert the object into a dict +pinned_message_response_dict = pinned_message_response_instance.to_dict() +# create an instance of PinnedMessageResponse from a dict +pinned_message_response_from_dict = PinnedMessageResponse.from_dict(pinned_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PinnedMessagesResponse.md b/docs/PinnedMessagesResponse.md new file mode 100644 index 0000000..3d892db --- /dev/null +++ b/docs/PinnedMessagesResponse.md @@ -0,0 +1,30 @@ +# PinnedMessagesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[PinnedMessageResponse]**](PinnedMessageResponse.md) | | [optional] +**has_more** | **bool** | | + +## Example + +```python +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PinnedMessagesResponse from a JSON string +pinned_messages_response_instance = PinnedMessagesResponse.from_json(json) +# print the JSON string representation of the object +print(PinnedMessagesResponse.to_json()) + +# convert the object into a dict +pinned_messages_response_dict = pinned_messages_response_instance.to_dict() +# create an instance of PinnedMessagesResponse from a dict +pinned_messages_response_from_dict = PinnedMessagesResponse.from_dict(pinned_messages_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollAnswerCreateRequest.md b/docs/PollAnswerCreateRequest.md new file mode 100644 index 0000000..12bd766 --- /dev/null +++ b/docs/PollAnswerCreateRequest.md @@ -0,0 +1,29 @@ +# PollAnswerCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**poll_media** | [**PollMediaCreateRequest**](PollMediaCreateRequest.md) | | + +## Example + +```python +from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PollAnswerCreateRequest from a JSON string +poll_answer_create_request_instance = PollAnswerCreateRequest.from_json(json) +# print the JSON string representation of the object +print(PollAnswerCreateRequest.to_json()) + +# convert the object into a dict +poll_answer_create_request_dict = poll_answer_create_request_instance.to_dict() +# create an instance of PollAnswerCreateRequest from a dict +poll_answer_create_request_from_dict = PollAnswerCreateRequest.from_dict(poll_answer_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollAnswerDetailsResponse.md b/docs/PollAnswerDetailsResponse.md new file mode 100644 index 0000000..6a73a0f --- /dev/null +++ b/docs/PollAnswerDetailsResponse.md @@ -0,0 +1,29 @@ +# PollAnswerDetailsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[UserResponse]**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollAnswerDetailsResponse from a JSON string +poll_answer_details_response_instance = PollAnswerDetailsResponse.from_json(json) +# print the JSON string representation of the object +print(PollAnswerDetailsResponse.to_json()) + +# convert the object into a dict +poll_answer_details_response_dict = poll_answer_details_response_instance.to_dict() +# create an instance of PollAnswerDetailsResponse from a dict +poll_answer_details_response_from_dict = PollAnswerDetailsResponse.from_dict(poll_answer_details_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollAnswerResponse.md b/docs/PollAnswerResponse.md new file mode 100644 index 0000000..2a60334 --- /dev/null +++ b/docs/PollAnswerResponse.md @@ -0,0 +1,30 @@ +# PollAnswerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**answer_id** | **int** | | +**poll_media** | [**PollMediaResponse**](PollMediaResponse.md) | | + +## Example + +```python +from dc_rest.models.poll_answer_response import PollAnswerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollAnswerResponse from a JSON string +poll_answer_response_instance = PollAnswerResponse.from_json(json) +# print the JSON string representation of the object +print(PollAnswerResponse.to_json()) + +# convert the object into a dict +poll_answer_response_dict = poll_answer_response_instance.to_dict() +# create an instance of PollAnswerResponse from a dict +poll_answer_response_from_dict = PollAnswerResponse.from_dict(poll_answer_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollCreateRequest.md b/docs/PollCreateRequest.md new file mode 100644 index 0000000..41ea893 --- /dev/null +++ b/docs/PollCreateRequest.md @@ -0,0 +1,33 @@ +# PollCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**question** | [**PollMedia**](PollMedia.md) | | +**answers** | [**List[PollAnswerCreateRequest]**](PollAnswerCreateRequest.md) | | +**allow_multiselect** | **bool** | | [optional] +**layout_type** | **int** | | [optional] +**duration** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.poll_create_request import PollCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PollCreateRequest from a JSON string +poll_create_request_instance = PollCreateRequest.from_json(json) +# print the JSON string representation of the object +print(PollCreateRequest.to_json()) + +# convert the object into a dict +poll_create_request_dict = poll_create_request_instance.to_dict() +# create an instance of PollCreateRequest from a dict +poll_create_request_from_dict = PollCreateRequest.from_dict(poll_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollEmoji.md b/docs/PollEmoji.md new file mode 100644 index 0000000..5bc4129 --- /dev/null +++ b/docs/PollEmoji.md @@ -0,0 +1,31 @@ +# PollEmoji + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**animated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.poll_emoji import PollEmoji + +# TODO update the JSON string below +json = "{}" +# create an instance of PollEmoji from a JSON string +poll_emoji_instance = PollEmoji.from_json(json) +# print the JSON string representation of the object +print(PollEmoji.to_json()) + +# convert the object into a dict +poll_emoji_dict = poll_emoji_instance.to_dict() +# create an instance of PollEmoji from a dict +poll_emoji_from_dict = PollEmoji.from_dict(poll_emoji_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollEmojiCreateRequest.md b/docs/PollEmojiCreateRequest.md new file mode 100644 index 0000000..2edecb1 --- /dev/null +++ b/docs/PollEmojiCreateRequest.md @@ -0,0 +1,31 @@ +# PollEmojiCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**animated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PollEmojiCreateRequest from a JSON string +poll_emoji_create_request_instance = PollEmojiCreateRequest.from_json(json) +# print the JSON string representation of the object +print(PollEmojiCreateRequest.to_json()) + +# convert the object into a dict +poll_emoji_create_request_dict = poll_emoji_create_request_instance.to_dict() +# create an instance of PollEmojiCreateRequest from a dict +poll_emoji_create_request_from_dict = PollEmojiCreateRequest.from_dict(poll_emoji_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollMedia.md b/docs/PollMedia.md new file mode 100644 index 0000000..52e9ade --- /dev/null +++ b/docs/PollMedia.md @@ -0,0 +1,30 @@ +# PollMedia + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | [optional] +**emoji** | [**PollEmoji**](PollEmoji.md) | | [optional] + +## Example + +```python +from dc_rest.models.poll_media import PollMedia + +# TODO update the JSON string below +json = "{}" +# create an instance of PollMedia from a JSON string +poll_media_instance = PollMedia.from_json(json) +# print the JSON string representation of the object +print(PollMedia.to_json()) + +# convert the object into a dict +poll_media_dict = poll_media_instance.to_dict() +# create an instance of PollMedia from a dict +poll_media_from_dict = PollMedia.from_dict(poll_media_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollMediaCreateRequest.md b/docs/PollMediaCreateRequest.md new file mode 100644 index 0000000..be01a43 --- /dev/null +++ b/docs/PollMediaCreateRequest.md @@ -0,0 +1,30 @@ +# PollMediaCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | [optional] +**emoji** | [**PollEmojiCreateRequest**](PollEmojiCreateRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.poll_media_create_request import PollMediaCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PollMediaCreateRequest from a JSON string +poll_media_create_request_instance = PollMediaCreateRequest.from_json(json) +# print the JSON string representation of the object +print(PollMediaCreateRequest.to_json()) + +# convert the object into a dict +poll_media_create_request_dict = poll_media_create_request_instance.to_dict() +# create an instance of PollMediaCreateRequest from a dict +poll_media_create_request_from_dict = PollMediaCreateRequest.from_dict(poll_media_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollMediaResponse.md b/docs/PollMediaResponse.md new file mode 100644 index 0000000..8e8a8c7 --- /dev/null +++ b/docs/PollMediaResponse.md @@ -0,0 +1,30 @@ +# PollMediaResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | [optional] +**emoji** | [**MessageReactionEmojiResponse**](MessageReactionEmojiResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.poll_media_response import PollMediaResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollMediaResponse from a JSON string +poll_media_response_instance = PollMediaResponse.from_json(json) +# print the JSON string representation of the object +print(PollMediaResponse.to_json()) + +# convert the object into a dict +poll_media_response_dict = poll_media_response_instance.to_dict() +# create an instance of PollMediaResponse from a dict +poll_media_response_from_dict = PollMediaResponse.from_dict(poll_media_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollResponse.md b/docs/PollResponse.md new file mode 100644 index 0000000..319c58e --- /dev/null +++ b/docs/PollResponse.md @@ -0,0 +1,34 @@ +# PollResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**question** | [**PollMediaResponse**](PollMediaResponse.md) | | +**answers** | [**List[PollAnswerResponse]**](PollAnswerResponse.md) | | +**expiry** | **datetime** | | +**allow_multiselect** | **bool** | | +**layout_type** | **int** | | +**results** | [**PollResultsResponse**](PollResultsResponse.md) | | + +## Example + +```python +from dc_rest.models.poll_response import PollResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollResponse from a JSON string +poll_response_instance = PollResponse.from_json(json) +# print the JSON string representation of the object +print(PollResponse.to_json()) + +# convert the object into a dict +poll_response_dict = poll_response_instance.to_dict() +# create an instance of PollResponse from a dict +poll_response_from_dict = PollResponse.from_dict(poll_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollResultsEntryResponse.md b/docs/PollResultsEntryResponse.md new file mode 100644 index 0000000..805fb76 --- /dev/null +++ b/docs/PollResultsEntryResponse.md @@ -0,0 +1,31 @@ +# PollResultsEntryResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**count** | **int** | | +**me_voted** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollResultsEntryResponse from a JSON string +poll_results_entry_response_instance = PollResultsEntryResponse.from_json(json) +# print the JSON string representation of the object +print(PollResultsEntryResponse.to_json()) + +# convert the object into a dict +poll_results_entry_response_dict = poll_results_entry_response_instance.to_dict() +# create an instance of PollResultsEntryResponse from a dict +poll_results_entry_response_from_dict = PollResultsEntryResponse.from_dict(poll_results_entry_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PollResultsResponse.md b/docs/PollResultsResponse.md new file mode 100644 index 0000000..3897c6d --- /dev/null +++ b/docs/PollResultsResponse.md @@ -0,0 +1,30 @@ +# PollResultsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**answer_counts** | [**List[PollResultsEntryResponse]**](PollResultsEntryResponse.md) | | [optional] +**is_finalized** | **bool** | | + +## Example + +```python +from dc_rest.models.poll_results_response import PollResultsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PollResultsResponse from a JSON string +poll_results_response_instance = PollResultsResponse.from_json(json) +# print the JSON string representation of the object +print(PollResultsResponse.to_json()) + +# convert the object into a dict +poll_results_response_dict = poll_results_response_instance.to_dict() +# create an instance of PollResultsResponse from a dict +poll_results_response_from_dict = PollResultsResponse.from_dict(poll_results_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PongInteractionCallbackRequest.md b/docs/PongInteractionCallbackRequest.md new file mode 100644 index 0000000..d63967a --- /dev/null +++ b/docs/PongInteractionCallbackRequest.md @@ -0,0 +1,29 @@ +# PongInteractionCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | + +## Example + +```python +from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PongInteractionCallbackRequest from a JSON string +pong_interaction_callback_request_instance = PongInteractionCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(PongInteractionCallbackRequest.to_json()) + +# convert the object into a dict +pong_interaction_callback_request_dict = pong_interaction_callback_request_instance.to_dict() +# create an instance of PongInteractionCallbackRequest from a dict +pong_interaction_callback_request_from_dict = PongInteractionCallbackRequest.from_dict(pong_interaction_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateApplicationResponse.md b/docs/PrivateApplicationResponse.md new file mode 100644 index 0000000..2888f91 --- /dev/null +++ b/docs/PrivateApplicationResponse.md @@ -0,0 +1,59 @@ +# PrivateApplicationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**icon** | **str** | | [optional] +**description** | **str** | | +**type** | **int** | | [optional] +**cover_image** | **str** | | [optional] +**primary_sku_id** | **str** | | [optional] +**bot** | [**UserResponse**](UserResponse.md) | | [optional] +**slug** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**rpc_origins** | **List[Optional[str]]** | | [optional] +**bot_public** | **bool** | | [optional] +**bot_require_code_grant** | **bool** | | [optional] +**terms_of_service_url** | **str** | | [optional] +**privacy_policy_url** | **str** | | [optional] +**custom_install_url** | **str** | | [optional] +**install_params** | [**ApplicationOAuth2InstallParamsResponse**](ApplicationOAuth2InstallParamsResponse.md) | | [optional] +**integration_types_config** | [**Dict[str, ApplicationIntegrationTypeConfigurationResponse]**](ApplicationIntegrationTypeConfigurationResponse.md) | | [optional] +**verify_key** | **str** | | +**flags** | **int** | | +**max_participants** | **int** | | [optional] +**tags** | **List[str]** | | [optional] +**redirect_uris** | **List[Optional[str]]** | | +**interactions_endpoint_url** | **str** | | [optional] +**role_connections_verification_url** | **str** | | [optional] +**owner** | [**UserResponse**](UserResponse.md) | | +**approximate_guild_count** | **int** | | [optional] +**approximate_user_install_count** | **int** | | +**approximate_user_authorization_count** | **int** | | +**explicit_content_filter** | **int** | | +**team** | [**TeamResponse**](TeamResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.private_application_response import PrivateApplicationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrivateApplicationResponse from a JSON string +private_application_response_instance = PrivateApplicationResponse.from_json(json) +# print the JSON string representation of the object +print(PrivateApplicationResponse.to_json()) + +# convert the object into a dict +private_application_response_dict = private_application_response_instance.to_dict() +# create an instance of PrivateApplicationResponse from a dict +private_application_response_from_dict = PrivateApplicationResponse.from_dict(private_application_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateChannelLocation.md b/docs/PrivateChannelLocation.md new file mode 100644 index 0000000..4d46d63 --- /dev/null +++ b/docs/PrivateChannelLocation.md @@ -0,0 +1,31 @@ +# PrivateChannelLocation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**kind** | **str** | | +**channel_id** | **str** | | + +## Example + +```python +from dc_rest.models.private_channel_location import PrivateChannelLocation + +# TODO update the JSON string below +json = "{}" +# create an instance of PrivateChannelLocation from a JSON string +private_channel_location_instance = PrivateChannelLocation.from_json(json) +# print the JSON string representation of the object +print(PrivateChannelLocation.to_json()) + +# convert the object into a dict +private_channel_location_dict = private_channel_location_instance.to_dict() +# create an instance of PrivateChannelLocation from a dict +private_channel_location_from_dict = PrivateChannelLocation.from_dict(private_channel_location_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateChannelResponse.md b/docs/PrivateChannelResponse.md new file mode 100644 index 0000000..468c116 --- /dev/null +++ b/docs/PrivateChannelResponse.md @@ -0,0 +1,34 @@ +# PrivateChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**recipients** | [**List[UserResponse]**](UserResponse.md) | | + +## Example + +```python +from dc_rest.models.private_channel_response import PrivateChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrivateChannelResponse from a JSON string +private_channel_response_instance = PrivateChannelResponse.from_json(json) +# print the JSON string representation of the object +print(PrivateChannelResponse.to_json()) + +# convert the object into a dict +private_channel_response_dict = private_channel_response_instance.to_dict() +# create an instance of PrivateChannelResponse from a dict +private_channel_response_from_dict = PrivateChannelResponse.from_dict(private_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateGroupChannelResponse.md b/docs/PrivateGroupChannelResponse.md new file mode 100644 index 0000000..5486fdd --- /dev/null +++ b/docs/PrivateGroupChannelResponse.md @@ -0,0 +1,39 @@ +# PrivateGroupChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**recipients** | [**List[UserResponse]**](UserResponse.md) | | +**name** | **str** | | [optional] +**icon** | **str** | | [optional] +**owner_id** | **str** | | [optional] +**managed** | **bool** | | [optional] +**application_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrivateGroupChannelResponse from a JSON string +private_group_channel_response_instance = PrivateGroupChannelResponse.from_json(json) +# print the JSON string representation of the object +print(PrivateGroupChannelResponse.to_json()) + +# convert the object into a dict +private_group_channel_response_dict = private_group_channel_response_instance.to_dict() +# create an instance of PrivateGroupChannelResponse from a dict +private_group_channel_response_from_dict = PrivateGroupChannelResponse.from_dict(private_group_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateGuildMemberResponse.md b/docs/PrivateGuildMemberResponse.md new file mode 100644 index 0000000..39af17b --- /dev/null +++ b/docs/PrivateGuildMemberResponse.md @@ -0,0 +1,41 @@ +# PrivateGuildMemberResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar** | **str** | | [optional] +**avatar_decoration_data** | [**UserAvatarDecorationResponse**](UserAvatarDecorationResponse.md) | | [optional] +**banner** | **str** | | [optional] +**communication_disabled_until** | **datetime** | | [optional] +**flags** | **int** | | +**joined_at** | **datetime** | | +**nick** | **str** | | [optional] +**pending** | **bool** | | +**premium_since** | **datetime** | | [optional] +**roles** | **List[str]** | | +**user** | [**UserResponse**](UserResponse.md) | | +**mute** | **bool** | | +**deaf** | **bool** | | + +## Example + +```python +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrivateGuildMemberResponse from a JSON string +private_guild_member_response_instance = PrivateGuildMemberResponse.from_json(json) +# print the JSON string representation of the object +print(PrivateGuildMemberResponse.to_json()) + +# convert the object into a dict +private_guild_member_response_dict = private_guild_member_response_instance.to_dict() +# create an instance of PrivateGuildMemberResponse from a dict +private_guild_member_response_from_dict = PrivateGuildMemberResponse.from_dict(private_guild_member_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProvisionalTokenResponse.md b/docs/ProvisionalTokenResponse.md new file mode 100644 index 0000000..bd8ce51 --- /dev/null +++ b/docs/ProvisionalTokenResponse.md @@ -0,0 +1,36 @@ +# ProvisionalTokenResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_type** | **str** | | +**access_token** | **str** | | +**expires_in** | **int** | | +**scope** | **str** | | +**id_token** | **str** | | +**refresh_token** | **str** | | [optional] +**scopes** | **List[str]** | | [optional] +**expires_at_s** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ProvisionalTokenResponse from a JSON string +provisional_token_response_instance = ProvisionalTokenResponse.from_json(json) +# print the JSON string representation of the object +print(ProvisionalTokenResponse.to_json()) + +# convert the object into a dict +provisional_token_response_dict = provisional_token_response_instance.to_dict() +# create an instance of ProvisionalTokenResponse from a dict +provisional_token_response_from_dict = ProvisionalTokenResponse.from_dict(provisional_token_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PruneGuildRequest.md b/docs/PruneGuildRequest.md new file mode 100644 index 0000000..269ad70 --- /dev/null +++ b/docs/PruneGuildRequest.md @@ -0,0 +1,31 @@ +# PruneGuildRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**days** | **int** | | [optional] +**compute_prune_count** | **bool** | | [optional] +**include_roles** | [**PruneGuildRequestIncludeRoles**](PruneGuildRequestIncludeRoles.md) | | [optional] + +## Example + +```python +from dc_rest.models.prune_guild_request import PruneGuildRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PruneGuildRequest from a JSON string +prune_guild_request_instance = PruneGuildRequest.from_json(json) +# print the JSON string representation of the object +print(PruneGuildRequest.to_json()) + +# convert the object into a dict +prune_guild_request_dict = prune_guild_request_instance.to_dict() +# create an instance of PruneGuildRequest from a dict +prune_guild_request_from_dict = PruneGuildRequest.from_dict(prune_guild_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PruneGuildRequestIncludeRoles.md b/docs/PruneGuildRequestIncludeRoles.md new file mode 100644 index 0000000..96f7aa1 --- /dev/null +++ b/docs/PruneGuildRequestIncludeRoles.md @@ -0,0 +1,28 @@ +# PruneGuildRequestIncludeRoles + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles + +# TODO update the JSON string below +json = "{}" +# create an instance of PruneGuildRequestIncludeRoles from a JSON string +prune_guild_request_include_roles_instance = PruneGuildRequestIncludeRoles.from_json(json) +# print the JSON string representation of the object +print(PruneGuildRequestIncludeRoles.to_json()) + +# convert the object into a dict +prune_guild_request_include_roles_dict = prune_guild_request_include_roles_instance.to_dict() +# create an instance of PruneGuildRequestIncludeRoles from a dict +prune_guild_request_include_roles_from_dict = PruneGuildRequestIncludeRoles.from_dict(prune_guild_request_include_roles_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PurchaseNotificationResponse.md b/docs/PurchaseNotificationResponse.md new file mode 100644 index 0000000..c7eb372 --- /dev/null +++ b/docs/PurchaseNotificationResponse.md @@ -0,0 +1,30 @@ +# PurchaseNotificationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**guild_product_purchase** | [**GuildProductPurchaseResponse**](GuildProductPurchaseResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PurchaseNotificationResponse from a JSON string +purchase_notification_response_instance = PurchaseNotificationResponse.from_json(json) +# print the JSON string representation of the object +print(PurchaseNotificationResponse.to_json()) + +# convert the object into a dict +purchase_notification_response_dict = purchase_notification_response_instance.to_dict() +# create an instance of PurchaseNotificationResponse from a dict +purchase_notification_response_from_dict = PurchaseNotificationResponse.from_dict(purchase_notification_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QuarantineUserAction.md b/docs/QuarantineUserAction.md new file mode 100644 index 0000000..3f04f73 --- /dev/null +++ b/docs/QuarantineUserAction.md @@ -0,0 +1,30 @@ +# QuarantineUserAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.quarantine_user_action import QuarantineUserAction + +# TODO update the JSON string below +json = "{}" +# create an instance of QuarantineUserAction from a JSON string +quarantine_user_action_instance = QuarantineUserAction.from_json(json) +# print the JSON string representation of the object +print(QuarantineUserAction.to_json()) + +# convert the object into a dict +quarantine_user_action_dict = quarantine_user_action_instance.to_dict() +# create an instance of QuarantineUserAction from a dict +quarantine_user_action_from_dict = QuarantineUserAction.from_dict(quarantine_user_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QuarantineUserActionResponse.md b/docs/QuarantineUserActionResponse.md new file mode 100644 index 0000000..b7e1c72 --- /dev/null +++ b/docs/QuarantineUserActionResponse.md @@ -0,0 +1,30 @@ +# QuarantineUserActionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | **object** | | + +## Example + +```python +from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of QuarantineUserActionResponse from a JSON string +quarantine_user_action_response_instance = QuarantineUserActionResponse.from_json(json) +# print the JSON string representation of the object +print(QuarantineUserActionResponse.to_json()) + +# convert the object into a dict +quarantine_user_action_response_dict = quarantine_user_action_response_instance.to_dict() +# create an instance of QuarantineUserActionResponse from a dict +quarantine_user_action_response_from_dict = QuarantineUserActionResponse.from_dict(quarantine_user_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResolvedObjectsResponse.md b/docs/ResolvedObjectsResponse.md new file mode 100644 index 0000000..e4f92cf --- /dev/null +++ b/docs/ResolvedObjectsResponse.md @@ -0,0 +1,32 @@ +# ResolvedObjectsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**Dict[str, UserResponse]**](UserResponse.md) | | +**members** | [**Dict[str, GuildMemberResponse]**](GuildMemberResponse.md) | | +**channels** | [**Dict[str, GetChannel200Response]**](GetChannel200Response.md) | | +**roles** | [**Dict[str, GuildRoleResponse]**](GuildRoleResponse.md) | | + +## Example + +```python +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResolvedObjectsResponse from a JSON string +resolved_objects_response_instance = ResolvedObjectsResponse.from_json(json) +# print the JSON string representation of the object +print(ResolvedObjectsResponse.to_json()) + +# convert the object into a dict +resolved_objects_response_dict = resolved_objects_response_instance.to_dict() +# create an instance of ResolvedObjectsResponse from a dict +resolved_objects_response_from_dict = ResolvedObjectsResponse.from_dict(resolved_objects_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceChannelResponse.md b/docs/ResourceChannelResponse.md new file mode 100644 index 0000000..1888a90 --- /dev/null +++ b/docs/ResourceChannelResponse.md @@ -0,0 +1,33 @@ +# ResourceChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | +**title** | **str** | | +**emoji** | [**SettingsEmojiResponse**](SettingsEmojiResponse.md) | | [optional] +**icon** | **str** | | [optional] +**description** | **str** | | + +## Example + +```python +from dc_rest.models.resource_channel_response import ResourceChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceChannelResponse from a JSON string +resource_channel_response_instance = ResourceChannelResponse.from_json(json) +# print the JSON string representation of the object +print(ResourceChannelResponse.to_json()) + +# convert the object into a dict +resource_channel_response_dict = resource_channel_response_instance.to_dict() +# create an instance of ResourceChannelResponse from a dict +resource_channel_response_from_dict = ResourceChannelResponse.from_dict(resource_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbed.md b/docs/RichEmbed.md new file mode 100644 index 0000000..c094388 --- /dev/null +++ b/docs/RichEmbed.md @@ -0,0 +1,41 @@ +# RichEmbed + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] +**url** | **str** | | [optional] +**title** | **str** | | [optional] +**color** | **int** | | [optional] +**timestamp** | **datetime** | | [optional] +**description** | **str** | | [optional] +**author** | [**RichEmbedAuthor**](RichEmbedAuthor.md) | | [optional] +**image** | [**RichEmbedImage**](RichEmbedImage.md) | | [optional] +**thumbnail** | [**RichEmbedThumbnail**](RichEmbedThumbnail.md) | | [optional] +**footer** | [**RichEmbedFooter**](RichEmbedFooter.md) | | [optional] +**fields** | [**List[RichEmbedField]**](RichEmbedField.md) | | [optional] +**provider** | [**RichEmbedProvider**](RichEmbedProvider.md) | | [optional] +**video** | [**RichEmbedVideo**](RichEmbedVideo.md) | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed import RichEmbed + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbed from a JSON string +rich_embed_instance = RichEmbed.from_json(json) +# print the JSON string representation of the object +print(RichEmbed.to_json()) + +# convert the object into a dict +rich_embed_dict = rich_embed_instance.to_dict() +# create an instance of RichEmbed from a dict +rich_embed_from_dict = RichEmbed.from_dict(rich_embed_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedAuthor.md b/docs/RichEmbedAuthor.md new file mode 100644 index 0000000..b1940f5 --- /dev/null +++ b/docs/RichEmbedAuthor.md @@ -0,0 +1,31 @@ +# RichEmbedAuthor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**url** | **str** | | [optional] +**icon_url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_author import RichEmbedAuthor + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedAuthor from a JSON string +rich_embed_author_instance = RichEmbedAuthor.from_json(json) +# print the JSON string representation of the object +print(RichEmbedAuthor.to_json()) + +# convert the object into a dict +rich_embed_author_dict = rich_embed_author_instance.to_dict() +# create an instance of RichEmbedAuthor from a dict +rich_embed_author_from_dict = RichEmbedAuthor.from_dict(rich_embed_author_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedField.md b/docs/RichEmbedField.md new file mode 100644 index 0000000..806bddf --- /dev/null +++ b/docs/RichEmbedField.md @@ -0,0 +1,31 @@ +# RichEmbedField + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | | +**inline** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_field import RichEmbedField + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedField from a JSON string +rich_embed_field_instance = RichEmbedField.from_json(json) +# print the JSON string representation of the object +print(RichEmbedField.to_json()) + +# convert the object into a dict +rich_embed_field_dict = rich_embed_field_instance.to_dict() +# create an instance of RichEmbedField from a dict +rich_embed_field_from_dict = RichEmbedField.from_dict(rich_embed_field_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedFooter.md b/docs/RichEmbedFooter.md new file mode 100644 index 0000000..3938c3e --- /dev/null +++ b/docs/RichEmbedFooter.md @@ -0,0 +1,30 @@ +# RichEmbedFooter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | [optional] +**icon_url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_footer import RichEmbedFooter + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedFooter from a JSON string +rich_embed_footer_instance = RichEmbedFooter.from_json(json) +# print the JSON string representation of the object +print(RichEmbedFooter.to_json()) + +# convert the object into a dict +rich_embed_footer_dict = rich_embed_footer_instance.to_dict() +# create an instance of RichEmbedFooter from a dict +rich_embed_footer_from_dict = RichEmbedFooter.from_dict(rich_embed_footer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedImage.md b/docs/RichEmbedImage.md new file mode 100644 index 0000000..ea2b49e --- /dev/null +++ b/docs/RichEmbedImage.md @@ -0,0 +1,35 @@ +# RichEmbedImage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**placeholder** | **str** | | [optional] +**placeholder_version** | **int** | | [optional] +**is_animated** | **bool** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_image import RichEmbedImage + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedImage from a JSON string +rich_embed_image_instance = RichEmbedImage.from_json(json) +# print the JSON string representation of the object +print(RichEmbedImage.to_json()) + +# convert the object into a dict +rich_embed_image_dict = rich_embed_image_instance.to_dict() +# create an instance of RichEmbedImage from a dict +rich_embed_image_from_dict = RichEmbedImage.from_dict(rich_embed_image_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedProvider.md b/docs/RichEmbedProvider.md new file mode 100644 index 0000000..64281a4 --- /dev/null +++ b/docs/RichEmbedProvider.md @@ -0,0 +1,30 @@ +# RichEmbedProvider + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**url** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_provider import RichEmbedProvider + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedProvider from a JSON string +rich_embed_provider_instance = RichEmbedProvider.from_json(json) +# print the JSON string representation of the object +print(RichEmbedProvider.to_json()) + +# convert the object into a dict +rich_embed_provider_dict = rich_embed_provider_instance.to_dict() +# create an instance of RichEmbedProvider from a dict +rich_embed_provider_from_dict = RichEmbedProvider.from_dict(rich_embed_provider_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedThumbnail.md b/docs/RichEmbedThumbnail.md new file mode 100644 index 0000000..1cf12a4 --- /dev/null +++ b/docs/RichEmbedThumbnail.md @@ -0,0 +1,35 @@ +# RichEmbedThumbnail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**placeholder** | **str** | | [optional] +**placeholder_version** | **int** | | [optional] +**is_animated** | **bool** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedThumbnail from a JSON string +rich_embed_thumbnail_instance = RichEmbedThumbnail.from_json(json) +# print the JSON string representation of the object +print(RichEmbedThumbnail.to_json()) + +# convert the object into a dict +rich_embed_thumbnail_dict = rich_embed_thumbnail_instance.to_dict() +# create an instance of RichEmbedThumbnail from a dict +rich_embed_thumbnail_from_dict = RichEmbedThumbnail.from_dict(rich_embed_thumbnail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RichEmbedVideo.md b/docs/RichEmbedVideo.md new file mode 100644 index 0000000..2ff9511 --- /dev/null +++ b/docs/RichEmbedVideo.md @@ -0,0 +1,35 @@ +# RichEmbedVideo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**placeholder** | **str** | | [optional] +**placeholder_version** | **int** | | [optional] +**is_animated** | **bool** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.rich_embed_video import RichEmbedVideo + +# TODO update the JSON string below +json = "{}" +# create an instance of RichEmbedVideo from a JSON string +rich_embed_video_instance = RichEmbedVideo.from_json(json) +# print the JSON string representation of the object +print(RichEmbedVideo.to_json()) + +# convert the object into a dict +rich_embed_video_dict = rich_embed_video_instance.to_dict() +# create an instance of RichEmbedVideo from a dict +rich_embed_video_from_dict = RichEmbedVideo.from_dict(rich_embed_video_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleSelectComponentForMessageRequest.md b/docs/RoleSelectComponentForMessageRequest.md new file mode 100644 index 0000000..666585a --- /dev/null +++ b/docs/RoleSelectComponentForMessageRequest.md @@ -0,0 +1,35 @@ +# RoleSelectComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[RoleSelectDefaultValue]**](RoleSelectDefaultValue.md) | | [optional] + +## Example + +```python +from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleSelectComponentForMessageRequest from a JSON string +role_select_component_for_message_request_instance = RoleSelectComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(RoleSelectComponentForMessageRequest.to_json()) + +# convert the object into a dict +role_select_component_for_message_request_dict = role_select_component_for_message_request_instance.to_dict() +# create an instance of RoleSelectComponentForMessageRequest from a dict +role_select_component_for_message_request_from_dict = RoleSelectComponentForMessageRequest.from_dict(role_select_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleSelectComponentResponse.md b/docs/RoleSelectComponentResponse.md new file mode 100644 index 0000000..886b288 --- /dev/null +++ b/docs/RoleSelectComponentResponse.md @@ -0,0 +1,36 @@ +# RoleSelectComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[RoleSelectDefaultValueResponse]**](RoleSelectDefaultValueResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.role_select_component_response import RoleSelectComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleSelectComponentResponse from a JSON string +role_select_component_response_instance = RoleSelectComponentResponse.from_json(json) +# print the JSON string representation of the object +print(RoleSelectComponentResponse.to_json()) + +# convert the object into a dict +role_select_component_response_dict = role_select_component_response_instance.to_dict() +# create an instance of RoleSelectComponentResponse from a dict +role_select_component_response_from_dict = RoleSelectComponentResponse.from_dict(role_select_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleSelectDefaultValue.md b/docs/RoleSelectDefaultValue.md new file mode 100644 index 0000000..b60d75f --- /dev/null +++ b/docs/RoleSelectDefaultValue.md @@ -0,0 +1,30 @@ +# RoleSelectDefaultValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleSelectDefaultValue from a JSON string +role_select_default_value_instance = RoleSelectDefaultValue.from_json(json) +# print the JSON string representation of the object +print(RoleSelectDefaultValue.to_json()) + +# convert the object into a dict +role_select_default_value_dict = role_select_default_value_instance.to_dict() +# create an instance of RoleSelectDefaultValue from a dict +role_select_default_value_from_dict = RoleSelectDefaultValue.from_dict(role_select_default_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleSelectDefaultValueResponse.md b/docs/RoleSelectDefaultValueResponse.md new file mode 100644 index 0000000..2da2fdd --- /dev/null +++ b/docs/RoleSelectDefaultValueResponse.md @@ -0,0 +1,30 @@ +# RoleSelectDefaultValueResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleSelectDefaultValueResponse from a JSON string +role_select_default_value_response_instance = RoleSelectDefaultValueResponse.from_json(json) +# print the JSON string representation of the object +print(RoleSelectDefaultValueResponse.to_json()) + +# convert the object into a dict +role_select_default_value_response_dict = role_select_default_value_response_instance.to_dict() +# create an instance of RoleSelectDefaultValueResponse from a dict +role_select_default_value_response_from_dict = RoleSelectDefaultValueResponse.from_dict(role_select_default_value_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SDKMessageRequest.md b/docs/SDKMessageRequest.md new file mode 100644 index 0000000..7b0b078 --- /dev/null +++ b/docs/SDKMessageRequest.md @@ -0,0 +1,41 @@ +# SDKMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**embeds** | [**List[RichEmbed]**](RichEmbed.md) | | [optional] +**allowed_mentions** | [**MessageAllowedMentionsRequest**](MessageAllowedMentionsRequest.md) | | [optional] +**sticker_ids** | **List[str]** | | [optional] +**components** | [**List[BaseCreateMessageCreateRequestComponentsInner]**](BaseCreateMessageCreateRequestComponentsInner.md) | | [optional] +**flags** | **int** | | [optional] +**attachments** | [**List[MessageAttachmentRequest]**](MessageAttachmentRequest.md) | | [optional] +**poll** | [**PollCreateRequest**](PollCreateRequest.md) | | [optional] +**confetti_potion** | **object** | | [optional] +**message_reference** | [**MessageReferenceRequest**](MessageReferenceRequest.md) | | [optional] +**nonce** | [**BasicMessageResponseNonce**](BasicMessageResponseNonce.md) | | [optional] +**enforce_nonce** | **bool** | | [optional] +**tts** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.sdk_message_request import SDKMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SDKMessageRequest from a JSON string +sdk_message_request_instance = SDKMessageRequest.from_json(json) +# print the JSON string representation of the object +print(SDKMessageRequest.to_json()) + +# convert the object into a dict +sdk_message_request_dict = sdk_message_request_instance.to_dict() +# create an instance of SDKMessageRequest from a dict +sdk_message_request_from_dict = SDKMessageRequest.from_dict(sdk_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScheduledEventResponse.md b/docs/ScheduledEventResponse.md new file mode 100644 index 0000000..b932488 --- /dev/null +++ b/docs/ScheduledEventResponse.md @@ -0,0 +1,44 @@ +# ScheduledEventResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**creator_id** | **str** | | [optional] +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**status** | **int** | | +**entity_type** | **int** | | +**entity_id** | **str** | | [optional] +**user_count** | **int** | | [optional] +**privacy_level** | **object** | | +**user_rsvp** | [**ScheduledEventUserResponse**](ScheduledEventUserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.scheduled_event_response import ScheduledEventResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ScheduledEventResponse from a JSON string +scheduled_event_response_instance = ScheduledEventResponse.from_json(json) +# print the JSON string representation of the object +print(ScheduledEventResponse.to_json()) + +# convert the object into a dict +scheduled_event_response_dict = scheduled_event_response_instance.to_dict() +# create an instance of ScheduledEventResponse from a dict +scheduled_event_response_from_dict = ScheduledEventResponse.from_dict(scheduled_event_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScheduledEventUserResponse.md b/docs/ScheduledEventUserResponse.md new file mode 100644 index 0000000..4d63863 --- /dev/null +++ b/docs/ScheduledEventUserResponse.md @@ -0,0 +1,32 @@ +# ScheduledEventUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_scheduled_event_id** | **str** | | +**user_id** | **str** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] +**member** | [**GuildMemberResponse**](GuildMemberResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ScheduledEventUserResponse from a JSON string +scheduled_event_user_response_instance = ScheduledEventUserResponse.from_json(json) +# print the JSON string representation of the object +print(ScheduledEventUserResponse.to_json()) + +# convert the object into a dict +scheduled_event_user_response_dict = scheduled_event_user_response_instance.to_dict() +# create an instance of ScheduledEventUserResponse from a dict +scheduled_event_user_response_from_dict = ScheduledEventUserResponse.from_dict(scheduled_event_user_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SectionComponentForMessageRequest.md b/docs/SectionComponentForMessageRequest.md new file mode 100644 index 0000000..1e6832b --- /dev/null +++ b/docs/SectionComponentForMessageRequest.md @@ -0,0 +1,31 @@ +# SectionComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**components** | [**List[TextDisplayComponentForMessageRequest]**](TextDisplayComponentForMessageRequest.md) | | +**accessory** | [**SectionComponentForMessageRequestAccessory**](SectionComponentForMessageRequestAccessory.md) | | + +## Example + +```python +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SectionComponentForMessageRequest from a JSON string +section_component_for_message_request_instance = SectionComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(SectionComponentForMessageRequest.to_json()) + +# convert the object into a dict +section_component_for_message_request_dict = section_component_for_message_request_instance.to_dict() +# create an instance of SectionComponentForMessageRequest from a dict +section_component_for_message_request_from_dict = SectionComponentForMessageRequest.from_dict(section_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SectionComponentForMessageRequestAccessory.md b/docs/SectionComponentForMessageRequestAccessory.md new file mode 100644 index 0000000..18d35bd --- /dev/null +++ b/docs/SectionComponentForMessageRequestAccessory.md @@ -0,0 +1,39 @@ +# SectionComponentForMessageRequestAccessory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | [optional] +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] +**emoji** | [**ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md) | | [optional] +**description** | **str** | | [optional] +**spoiler** | **bool** | | [optional] +**media** | [**UnfurledMediaRequest**](UnfurledMediaRequest.md) | | + +## Example + +```python +from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory + +# TODO update the JSON string below +json = "{}" +# create an instance of SectionComponentForMessageRequestAccessory from a JSON string +section_component_for_message_request_accessory_instance = SectionComponentForMessageRequestAccessory.from_json(json) +# print the JSON string representation of the object +print(SectionComponentForMessageRequestAccessory.to_json()) + +# convert the object into a dict +section_component_for_message_request_accessory_dict = section_component_for_message_request_accessory_instance.to_dict() +# create an instance of SectionComponentForMessageRequestAccessory from a dict +section_component_for_message_request_accessory_from_dict = SectionComponentForMessageRequestAccessory.from_dict(section_component_for_message_request_accessory_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SectionComponentResponse.md b/docs/SectionComponentResponse.md new file mode 100644 index 0000000..7ab2dc4 --- /dev/null +++ b/docs/SectionComponentResponse.md @@ -0,0 +1,32 @@ +# SectionComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**components** | [**List[TextDisplayComponentResponse]**](TextDisplayComponentResponse.md) | | +**accessory** | [**SectionComponentResponseAccessory**](SectionComponentResponseAccessory.md) | | + +## Example + +```python +from dc_rest.models.section_component_response import SectionComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SectionComponentResponse from a JSON string +section_component_response_instance = SectionComponentResponse.from_json(json) +# print the JSON string representation of the object +print(SectionComponentResponse.to_json()) + +# convert the object into a dict +section_component_response_dict = section_component_response_instance.to_dict() +# create an instance of SectionComponentResponse from a dict +section_component_response_from_dict = SectionComponentResponse.from_dict(section_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SectionComponentResponseAccessory.md b/docs/SectionComponentResponseAccessory.md new file mode 100644 index 0000000..92970f6 --- /dev/null +++ b/docs/SectionComponentResponseAccessory.md @@ -0,0 +1,40 @@ +# SectionComponentResponseAccessory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | [optional] +**style** | **int** | | +**label** | **str** | | [optional] +**disabled** | **bool** | | [optional] +**emoji** | [**ComponentEmojiResponse**](ComponentEmojiResponse.md) | | [optional] +**url** | **str** | | [optional] +**sku_id** | **str** | | [optional] +**media** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**description** | **str** | | [optional] +**spoiler** | **bool** | | + +## Example + +```python +from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory + +# TODO update the JSON string below +json = "{}" +# create an instance of SectionComponentResponseAccessory from a JSON string +section_component_response_accessory_instance = SectionComponentResponseAccessory.from_json(json) +# print the JSON string representation of the object +print(SectionComponentResponseAccessory.to_json()) + +# convert the object into a dict +section_component_response_accessory_dict = section_component_response_accessory_instance.to_dict() +# create an instance of SectionComponentResponseAccessory from a dict +section_component_response_accessory_from_dict = SectionComponentResponseAccessory.from_dict(section_component_response_accessory_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SeparatorComponentForMessageRequest.md b/docs/SeparatorComponentForMessageRequest.md new file mode 100644 index 0000000..8266504 --- /dev/null +++ b/docs/SeparatorComponentForMessageRequest.md @@ -0,0 +1,31 @@ +# SeparatorComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**spacing** | **int** | | [optional] +**divider** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SeparatorComponentForMessageRequest from a JSON string +separator_component_for_message_request_instance = SeparatorComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(SeparatorComponentForMessageRequest.to_json()) + +# convert the object into a dict +separator_component_for_message_request_dict = separator_component_for_message_request_instance.to_dict() +# create an instance of SeparatorComponentForMessageRequest from a dict +separator_component_for_message_request_from_dict = SeparatorComponentForMessageRequest.from_dict(separator_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SeparatorComponentResponse.md b/docs/SeparatorComponentResponse.md new file mode 100644 index 0000000..b0db570 --- /dev/null +++ b/docs/SeparatorComponentResponse.md @@ -0,0 +1,32 @@ +# SeparatorComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**spacing** | **int** | | +**divider** | **bool** | | + +## Example + +```python +from dc_rest.models.separator_component_response import SeparatorComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SeparatorComponentResponse from a JSON string +separator_component_response_instance = SeparatorComponentResponse.from_json(json) +# print the JSON string representation of the object +print(SeparatorComponentResponse.to_json()) + +# convert the object into a dict +separator_component_response_dict = separator_component_response_instance.to_dict() +# create an instance of SeparatorComponentResponse from a dict +separator_component_response_from_dict = SeparatorComponentResponse.from_dict(separator_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetChannelPermissionOverwriteRequest.md b/docs/SetChannelPermissionOverwriteRequest.md new file mode 100644 index 0000000..eb15509 --- /dev/null +++ b/docs/SetChannelPermissionOverwriteRequest.md @@ -0,0 +1,31 @@ +# SetChannelPermissionOverwriteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**allow** | **int** | | [optional] +**deny** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SetChannelPermissionOverwriteRequest from a JSON string +set_channel_permission_overwrite_request_instance = SetChannelPermissionOverwriteRequest.from_json(json) +# print the JSON string representation of the object +print(SetChannelPermissionOverwriteRequest.to_json()) + +# convert the object into a dict +set_channel_permission_overwrite_request_dict = set_channel_permission_overwrite_request_instance.to_dict() +# create an instance of SetChannelPermissionOverwriteRequest from a dict +set_channel_permission_overwrite_request_from_dict = SetChannelPermissionOverwriteRequest.from_dict(set_channel_permission_overwrite_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetGuildApplicationCommandPermissionsRequest.md b/docs/SetGuildApplicationCommandPermissionsRequest.md new file mode 100644 index 0000000..e6ea867 --- /dev/null +++ b/docs/SetGuildApplicationCommandPermissionsRequest.md @@ -0,0 +1,29 @@ +# SetGuildApplicationCommandPermissionsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permissions** | [**List[ApplicationCommandPermission]**](ApplicationCommandPermission.md) | | [optional] + +## Example + +```python +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SetGuildApplicationCommandPermissionsRequest from a JSON string +set_guild_application_command_permissions_request_instance = SetGuildApplicationCommandPermissionsRequest.from_json(json) +# print the JSON string representation of the object +print(SetGuildApplicationCommandPermissionsRequest.to_json()) + +# convert the object into a dict +set_guild_application_command_permissions_request_dict = set_guild_application_command_permissions_request_instance.to_dict() +# create an instance of SetGuildApplicationCommandPermissionsRequest from a dict +set_guild_application_command_permissions_request_from_dict = SetGuildApplicationCommandPermissionsRequest.from_dict(set_guild_application_command_permissions_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetGuildMfaLevelRequest.md b/docs/SetGuildMfaLevelRequest.md new file mode 100644 index 0000000..e8450f7 --- /dev/null +++ b/docs/SetGuildMfaLevelRequest.md @@ -0,0 +1,29 @@ +# SetGuildMfaLevelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level** | **int** | | + +## Example + +```python +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SetGuildMfaLevelRequest from a JSON string +set_guild_mfa_level_request_instance = SetGuildMfaLevelRequest.from_json(json) +# print the JSON string representation of the object +print(SetGuildMfaLevelRequest.to_json()) + +# convert the object into a dict +set_guild_mfa_level_request_dict = set_guild_mfa_level_request_instance.to_dict() +# create an instance of SetGuildMfaLevelRequest from a dict +set_guild_mfa_level_request_from_dict = SetGuildMfaLevelRequest.from_dict(set_guild_mfa_level_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SettingsEmojiResponse.md b/docs/SettingsEmojiResponse.md new file mode 100644 index 0000000..f821a1f --- /dev/null +++ b/docs/SettingsEmojiResponse.md @@ -0,0 +1,31 @@ +# SettingsEmojiResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**animated** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SettingsEmojiResponse from a JSON string +settings_emoji_response_instance = SettingsEmojiResponse.from_json(json) +# print the JSON string representation of the object +print(SettingsEmojiResponse.to_json()) + +# convert the object into a dict +settings_emoji_response_dict = settings_emoji_response_instance.to_dict() +# create an instance of SettingsEmojiResponse from a dict +settings_emoji_response_from_dict = SettingsEmojiResponse.from_dict(settings_emoji_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SlackWebhook.md b/docs/SlackWebhook.md new file mode 100644 index 0000000..752df19 --- /dev/null +++ b/docs/SlackWebhook.md @@ -0,0 +1,32 @@ +# SlackWebhook + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | | [optional] +**username** | **str** | | [optional] +**icon_url** | **str** | | [optional] +**attachments** | [**List[WebhookSlackEmbed]**](WebhookSlackEmbed.md) | | [optional] + +## Example + +```python +from dc_rest.models.slack_webhook import SlackWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of SlackWebhook from a JSON string +slack_webhook_instance = SlackWebhook.from_json(json) +# print the JSON string representation of the object +print(SlackWebhook.to_json()) + +# convert the object into a dict +slack_webhook_dict = slack_webhook_instance.to_dict() +# create an instance of SlackWebhook from a dict +slack_webhook_from_dict = SlackWebhook.from_dict(slack_webhook_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SoundboardCreateRequest.md b/docs/SoundboardCreateRequest.md new file mode 100644 index 0000000..27e60b5 --- /dev/null +++ b/docs/SoundboardCreateRequest.md @@ -0,0 +1,33 @@ +# SoundboardCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**volume** | **float** | | [optional] +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**sound** | **str** | | + +## Example + +```python +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SoundboardCreateRequest from a JSON string +soundboard_create_request_instance = SoundboardCreateRequest.from_json(json) +# print the JSON string representation of the object +print(SoundboardCreateRequest.to_json()) + +# convert the object into a dict +soundboard_create_request_dict = soundboard_create_request_instance.to_dict() +# create an instance of SoundboardCreateRequest from a dict +soundboard_create_request_from_dict = SoundboardCreateRequest.from_dict(soundboard_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SoundboardPatchRequestPartial.md b/docs/SoundboardPatchRequestPartial.md new file mode 100644 index 0000000..067f730 --- /dev/null +++ b/docs/SoundboardPatchRequestPartial.md @@ -0,0 +1,32 @@ +# SoundboardPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**volume** | **float** | | [optional] +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of SoundboardPatchRequestPartial from a JSON string +soundboard_patch_request_partial_instance = SoundboardPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(SoundboardPatchRequestPartial.to_json()) + +# convert the object into a dict +soundboard_patch_request_partial_dict = soundboard_patch_request_partial_instance.to_dict() +# create an instance of SoundboardPatchRequestPartial from a dict +soundboard_patch_request_partial_from_dict = SoundboardPatchRequestPartial.from_dict(soundboard_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SoundboardSoundResponse.md b/docs/SoundboardSoundResponse.md new file mode 100644 index 0000000..50df455 --- /dev/null +++ b/docs/SoundboardSoundResponse.md @@ -0,0 +1,36 @@ +# SoundboardSoundResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**sound_id** | **str** | | +**volume** | **float** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**guild_id** | **str** | | [optional] +**available** | **bool** | | +**user** | [**UserResponse**](UserResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SoundboardSoundResponse from a JSON string +soundboard_sound_response_instance = SoundboardSoundResponse.from_json(json) +# print the JSON string representation of the object +print(SoundboardSoundResponse.to_json()) + +# convert the object into a dict +soundboard_sound_response_dict = soundboard_sound_response_instance.to_dict() +# create an instance of SoundboardSoundResponse from a dict +soundboard_sound_response_from_dict = SoundboardSoundResponse.from_dict(soundboard_sound_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SoundboardSoundSendRequest.md b/docs/SoundboardSoundSendRequest.md new file mode 100644 index 0000000..7b5c074 --- /dev/null +++ b/docs/SoundboardSoundSendRequest.md @@ -0,0 +1,30 @@ +# SoundboardSoundSendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sound_id** | **str** | | +**source_guild_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SoundboardSoundSendRequest from a JSON string +soundboard_sound_send_request_instance = SoundboardSoundSendRequest.from_json(json) +# print the JSON string representation of the object +print(SoundboardSoundSendRequest.to_json()) + +# convert the object into a dict +soundboard_sound_send_request_dict = soundboard_sound_send_request_instance.to_dict() +# create an instance of SoundboardSoundSendRequest from a dict +soundboard_sound_send_request_from_dict = SoundboardSoundSendRequest.from_dict(soundboard_sound_send_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SpamLinkRuleResponse.md b/docs/SpamLinkRuleResponse.md new file mode 100644 index 0000000..080ea78 --- /dev/null +++ b/docs/SpamLinkRuleResponse.md @@ -0,0 +1,39 @@ +# SpamLinkRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**creator_id** | **str** | | +**name** | **str** | | +**event_type** | **int** | | +**actions** | [**List[DefaultKeywordRuleResponseActionsInner]**](DefaultKeywordRuleResponseActionsInner.md) | | +**trigger_type** | **int** | | +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_metadata** | **object** | | + +## Example + +```python +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SpamLinkRuleResponse from a JSON string +spam_link_rule_response_instance = SpamLinkRuleResponse.from_json(json) +# print the JSON string representation of the object +print(SpamLinkRuleResponse.to_json()) + +# convert the object into a dict +spam_link_rule_response_dict = spam_link_rule_response_instance.to_dict() +# create an instance of SpamLinkRuleResponse from a dict +spam_link_rule_response_from_dict = SpamLinkRuleResponse.from_dict(spam_link_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageInstanceResponse.md b/docs/StageInstanceResponse.md new file mode 100644 index 0000000..933cb28 --- /dev/null +++ b/docs/StageInstanceResponse.md @@ -0,0 +1,35 @@ +# StageInstanceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_id** | **str** | | +**channel_id** | **str** | | +**topic** | **str** | | +**privacy_level** | **int** | | +**id** | **str** | | +**discoverable_disabled** | **bool** | | [optional] +**guild_scheduled_event_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.stage_instance_response import StageInstanceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StageInstanceResponse from a JSON string +stage_instance_response_instance = StageInstanceResponse.from_json(json) +# print the JSON string representation of the object +print(StageInstanceResponse.to_json()) + +# convert the object into a dict +stage_instance_response_dict = stage_instance_response_instance.to_dict() +# create an instance of StageInstanceResponse from a dict +stage_instance_response_from_dict = StageInstanceResponse.from_dict(stage_instance_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageScheduledEventCreateRequest.md b/docs/StageScheduledEventCreateRequest.md new file mode 100644 index 0000000..0bff275 --- /dev/null +++ b/docs/StageScheduledEventCreateRequest.md @@ -0,0 +1,37 @@ +# StageScheduledEventCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**privacy_level** | **object** | | +**entity_type** | **int** | | +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of StageScheduledEventCreateRequest from a JSON string +stage_scheduled_event_create_request_instance = StageScheduledEventCreateRequest.from_json(json) +# print the JSON string representation of the object +print(StageScheduledEventCreateRequest.to_json()) + +# convert the object into a dict +stage_scheduled_event_create_request_dict = stage_scheduled_event_create_request_instance.to_dict() +# create an instance of StageScheduledEventCreateRequest from a dict +stage_scheduled_event_create_request_from_dict = StageScheduledEventCreateRequest.from_dict(stage_scheduled_event_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageScheduledEventPatchRequestPartial.md b/docs/StageScheduledEventPatchRequestPartial.md new file mode 100644 index 0000000..97e5027 --- /dev/null +++ b/docs/StageScheduledEventPatchRequestPartial.md @@ -0,0 +1,38 @@ +# StageScheduledEventPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | [optional] +**scheduled_end_time** | **datetime** | | [optional] +**entity_type** | **int** | | [optional] +**privacy_level** | **object** | | [optional] +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of StageScheduledEventPatchRequestPartial from a JSON string +stage_scheduled_event_patch_request_partial_instance = StageScheduledEventPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(StageScheduledEventPatchRequestPartial.to_json()) + +# convert the object into a dict +stage_scheduled_event_patch_request_partial_dict = stage_scheduled_event_patch_request_partial_instance.to_dict() +# create an instance of StageScheduledEventPatchRequestPartial from a dict +stage_scheduled_event_patch_request_partial_from_dict = StageScheduledEventPatchRequestPartial.from_dict(stage_scheduled_event_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageScheduledEventResponse.md b/docs/StageScheduledEventResponse.md new file mode 100644 index 0000000..095dbcf --- /dev/null +++ b/docs/StageScheduledEventResponse.md @@ -0,0 +1,45 @@ +# StageScheduledEventResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**creator_id** | **str** | | [optional] +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**status** | **int** | | +**entity_type** | **int** | | +**entity_id** | **str** | | [optional] +**user_count** | **int** | | [optional] +**privacy_level** | **object** | | +**user_rsvp** | [**ScheduledEventUserResponse**](ScheduledEventUserResponse.md) | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StageScheduledEventResponse from a JSON string +stage_scheduled_event_response_instance = StageScheduledEventResponse.from_json(json) +# print the JSON string representation of the object +print(StageScheduledEventResponse.to_json()) + +# convert the object into a dict +stage_scheduled_event_response_dict = stage_scheduled_event_response_instance.to_dict() +# create an instance of StageScheduledEventResponse from a dict +stage_scheduled_event_response_from_dict = StageScheduledEventResponse.from_dict(stage_scheduled_event_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StandardStickerResponse.md b/docs/StandardStickerResponse.md new file mode 100644 index 0000000..133c893 --- /dev/null +++ b/docs/StandardStickerResponse.md @@ -0,0 +1,36 @@ +# StandardStickerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**tags** | **str** | | +**type** | **int** | | +**format_type** | **int** | | [optional] +**description** | **str** | | [optional] +**pack_id** | **str** | | +**sort_value** | **int** | | + +## Example + +```python +from dc_rest.models.standard_sticker_response import StandardStickerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StandardStickerResponse from a JSON string +standard_sticker_response_instance = StandardStickerResponse.from_json(json) +# print the JSON string representation of the object +print(StandardStickerResponse.to_json()) + +# convert the object into a dict +standard_sticker_response_dict = standard_sticker_response_instance.to_dict() +# create an instance of StandardStickerResponse from a dict +standard_sticker_response_from_dict = StandardStickerResponse.from_dict(standard_sticker_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StickerPackCollectionResponse.md b/docs/StickerPackCollectionResponse.md new file mode 100644 index 0000000..7997487 --- /dev/null +++ b/docs/StickerPackCollectionResponse.md @@ -0,0 +1,29 @@ +# StickerPackCollectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sticker_packs** | [**List[StickerPackResponse]**](StickerPackResponse.md) | | + +## Example + +```python +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StickerPackCollectionResponse from a JSON string +sticker_pack_collection_response_instance = StickerPackCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(StickerPackCollectionResponse.to_json()) + +# convert the object into a dict +sticker_pack_collection_response_dict = sticker_pack_collection_response_instance.to_dict() +# create an instance of StickerPackCollectionResponse from a dict +sticker_pack_collection_response_from_dict = StickerPackCollectionResponse.from_dict(sticker_pack_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StickerPackResponse.md b/docs/StickerPackResponse.md new file mode 100644 index 0000000..af61ee5 --- /dev/null +++ b/docs/StickerPackResponse.md @@ -0,0 +1,35 @@ +# StickerPackResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**sku_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**stickers** | [**List[StandardStickerResponse]**](StandardStickerResponse.md) | | +**cover_sticker_id** | **str** | | [optional] +**banner_asset_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.sticker_pack_response import StickerPackResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StickerPackResponse from a JSON string +sticker_pack_response_instance = StickerPackResponse.from_json(json) +# print the JSON string representation of the object +print(StickerPackResponse.to_json()) + +# convert the object into a dict +sticker_pack_response_dict = sticker_pack_response_instance.to_dict() +# create an instance of StickerPackResponse from a dict +sticker_pack_response_from_dict = StickerPackResponse.from_dict(sticker_pack_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringSelectComponentForMessageRequest.md b/docs/StringSelectComponentForMessageRequest.md new file mode 100644 index 0000000..90ae36b --- /dev/null +++ b/docs/StringSelectComponentForMessageRequest.md @@ -0,0 +1,35 @@ +# StringSelectComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**options** | [**List[StringSelectOptionForMessageRequest]**](StringSelectOptionForMessageRequest.md) | | + +## Example + +```python +from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of StringSelectComponentForMessageRequest from a JSON string +string_select_component_for_message_request_instance = StringSelectComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(StringSelectComponentForMessageRequest.to_json()) + +# convert the object into a dict +string_select_component_for_message_request_dict = string_select_component_for_message_request_instance.to_dict() +# create an instance of StringSelectComponentForMessageRequest from a dict +string_select_component_for_message_request_from_dict = StringSelectComponentForMessageRequest.from_dict(string_select_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringSelectComponentResponse.md b/docs/StringSelectComponentResponse.md new file mode 100644 index 0000000..dbd2363 --- /dev/null +++ b/docs/StringSelectComponentResponse.md @@ -0,0 +1,36 @@ +# StringSelectComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**options** | [**List[StringSelectOptionResponse]**](StringSelectOptionResponse.md) | | + +## Example + +```python +from dc_rest.models.string_select_component_response import StringSelectComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StringSelectComponentResponse from a JSON string +string_select_component_response_instance = StringSelectComponentResponse.from_json(json) +# print the JSON string representation of the object +print(StringSelectComponentResponse.to_json()) + +# convert the object into a dict +string_select_component_response_dict = string_select_component_response_instance.to_dict() +# create an instance of StringSelectComponentResponse from a dict +string_select_component_response_from_dict = StringSelectComponentResponse.from_dict(string_select_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringSelectOptionForMessageRequest.md b/docs/StringSelectOptionForMessageRequest.md new file mode 100644 index 0000000..8331359 --- /dev/null +++ b/docs/StringSelectOptionForMessageRequest.md @@ -0,0 +1,33 @@ +# StringSelectOptionForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | +**value** | **str** | | +**description** | **str** | | [optional] +**default** | **bool** | | [optional] +**emoji** | [**ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of StringSelectOptionForMessageRequest from a JSON string +string_select_option_for_message_request_instance = StringSelectOptionForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(StringSelectOptionForMessageRequest.to_json()) + +# convert the object into a dict +string_select_option_for_message_request_dict = string_select_option_for_message_request_instance.to_dict() +# create an instance of StringSelectOptionForMessageRequest from a dict +string_select_option_for_message_request_from_dict = StringSelectOptionForMessageRequest.from_dict(string_select_option_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringSelectOptionResponse.md b/docs/StringSelectOptionResponse.md new file mode 100644 index 0000000..e46e64c --- /dev/null +++ b/docs/StringSelectOptionResponse.md @@ -0,0 +1,33 @@ +# StringSelectOptionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | +**value** | **str** | | +**description** | **str** | | [optional] +**emoji** | [**ComponentEmojiResponse**](ComponentEmojiResponse.md) | | [optional] +**default** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.string_select_option_response import StringSelectOptionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StringSelectOptionResponse from a JSON string +string_select_option_response_instance = StringSelectOptionResponse.from_json(json) +# print the JSON string representation of the object +print(StringSelectOptionResponse.to_json()) + +# convert the object into a dict +string_select_option_response_dict = string_select_option_response_instance.to_dict() +# create an instance of StringSelectOptionResponse from a dict +string_select_option_response_from_dict = StringSelectOptionResponse.from_dict(string_select_option_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamMemberResponse.md b/docs/TeamMemberResponse.md new file mode 100644 index 0000000..3d97a5b --- /dev/null +++ b/docs/TeamMemberResponse.md @@ -0,0 +1,31 @@ +# TeamMemberResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**UserResponse**](UserResponse.md) | | +**team_id** | **str** | | +**membership_state** | **int** | | + +## Example + +```python +from dc_rest.models.team_member_response import TeamMemberResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamMemberResponse from a JSON string +team_member_response_instance = TeamMemberResponse.from_json(json) +# print the JSON string representation of the object +print(TeamMemberResponse.to_json()) + +# convert the object into a dict +team_member_response_dict = team_member_response_instance.to_dict() +# create an instance of TeamMemberResponse from a dict +team_member_response_from_dict = TeamMemberResponse.from_dict(team_member_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamResponse.md b/docs/TeamResponse.md new file mode 100644 index 0000000..f5f0d90 --- /dev/null +++ b/docs/TeamResponse.md @@ -0,0 +1,33 @@ +# TeamResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**icon** | **str** | | [optional] +**name** | **str** | | +**owner_user_id** | **str** | | +**members** | [**List[TeamMemberResponse]**](TeamMemberResponse.md) | | + +## Example + +```python +from dc_rest.models.team_response import TeamResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamResponse from a JSON string +team_response_instance = TeamResponse.from_json(json) +# print the JSON string representation of the object +print(TeamResponse.to_json()) + +# convert the object into a dict +team_response_dict = team_response_instance.to_dict() +# create an instance of TeamResponse from a dict +team_response_from_dict = TeamResponse.from_dict(team_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextDisplayComponentForMessageRequest.md b/docs/TextDisplayComponentForMessageRequest.md new file mode 100644 index 0000000..406f61a --- /dev/null +++ b/docs/TextDisplayComponentForMessageRequest.md @@ -0,0 +1,30 @@ +# TextDisplayComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**content** | **str** | | + +## Example + +```python +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TextDisplayComponentForMessageRequest from a JSON string +text_display_component_for_message_request_instance = TextDisplayComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(TextDisplayComponentForMessageRequest.to_json()) + +# convert the object into a dict +text_display_component_for_message_request_dict = text_display_component_for_message_request_instance.to_dict() +# create an instance of TextDisplayComponentForMessageRequest from a dict +text_display_component_for_message_request_from_dict = TextDisplayComponentForMessageRequest.from_dict(text_display_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextDisplayComponentResponse.md b/docs/TextDisplayComponentResponse.md new file mode 100644 index 0000000..e22819e --- /dev/null +++ b/docs/TextDisplayComponentResponse.md @@ -0,0 +1,31 @@ +# TextDisplayComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**content** | **str** | | + +## Example + +```python +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TextDisplayComponentResponse from a JSON string +text_display_component_response_instance = TextDisplayComponentResponse.from_json(json) +# print the JSON string representation of the object +print(TextDisplayComponentResponse.to_json()) + +# convert the object into a dict +text_display_component_response_dict = text_display_component_response_instance.to_dict() +# create an instance of TextDisplayComponentResponse from a dict +text_display_component_response_from_dict = TextDisplayComponentResponse.from_dict(text_display_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextInputComponentForModalRequest.md b/docs/TextInputComponentForModalRequest.md new file mode 100644 index 0000000..e6463f8 --- /dev/null +++ b/docs/TextInputComponentForModalRequest.md @@ -0,0 +1,37 @@ +# TextInputComponentForModalRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**style** | **int** | | +**label** | **str** | | +**value** | **str** | | [optional] +**placeholder** | **str** | | [optional] +**required** | **bool** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TextInputComponentForModalRequest from a JSON string +text_input_component_for_modal_request_instance = TextInputComponentForModalRequest.from_json(json) +# print the JSON string representation of the object +print(TextInputComponentForModalRequest.to_json()) + +# convert the object into a dict +text_input_component_for_modal_request_dict = text_input_component_for_modal_request_instance.to_dict() +# create an instance of TextInputComponentForModalRequest from a dict +text_input_component_for_modal_request_from_dict = TextInputComponentForModalRequest.from_dict(text_input_component_for_modal_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextInputComponentResponse.md b/docs/TextInputComponentResponse.md new file mode 100644 index 0000000..a570542 --- /dev/null +++ b/docs/TextInputComponentResponse.md @@ -0,0 +1,38 @@ +# TextInputComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**style** | **int** | | +**label** | **str** | | [optional] +**value** | **str** | | [optional] +**placeholder** | **str** | | [optional] +**required** | **bool** | | [optional] +**min_length** | **int** | | [optional] +**max_length** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.text_input_component_response import TextInputComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TextInputComponentResponse from a JSON string +text_input_component_response_instance = TextInputComponentResponse.from_json(json) +# print the JSON string representation of the object +print(TextInputComponentResponse.to_json()) + +# convert the object into a dict +text_input_component_response_dict = text_input_component_response_instance.to_dict() +# create an instance of TextInputComponentResponse from a dict +text_input_component_response_from_dict = TextInputComponentResponse.from_dict(text_input_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadMemberResponse.md b/docs/ThreadMemberResponse.md new file mode 100644 index 0000000..605bc85 --- /dev/null +++ b/docs/ThreadMemberResponse.md @@ -0,0 +1,33 @@ +# ThreadMemberResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**join_timestamp** | **datetime** | | +**flags** | **int** | | +**member** | [**GuildMemberResponse**](GuildMemberResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.thread_member_response import ThreadMemberResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadMemberResponse from a JSON string +thread_member_response_instance = ThreadMemberResponse.from_json(json) +# print the JSON string representation of the object +print(ThreadMemberResponse.to_json()) + +# convert the object into a dict +thread_member_response_dict = thread_member_response_instance.to_dict() +# create an instance of ThreadMemberResponse from a dict +thread_member_response_from_dict = ThreadMemberResponse.from_dict(thread_member_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadMetadataResponse.md b/docs/ThreadMetadataResponse.md new file mode 100644 index 0000000..fb9c40d --- /dev/null +++ b/docs/ThreadMetadataResponse.md @@ -0,0 +1,34 @@ +# ThreadMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archived** | **bool** | | +**archive_timestamp** | **datetime** | | [optional] +**auto_archive_duration** | **int** | | +**locked** | **bool** | | +**create_timestamp** | **datetime** | | [optional] +**invitable** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadMetadataResponse from a JSON string +thread_metadata_response_instance = ThreadMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(ThreadMetadataResponse.to_json()) + +# convert the object into a dict +thread_metadata_response_dict = thread_metadata_response_instance.to_dict() +# create an instance of ThreadMetadataResponse from a dict +thread_metadata_response_from_dict = ThreadMetadataResponse.from_dict(thread_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadResponse.md b/docs/ThreadResponse.md new file mode 100644 index 0000000..f79f01c --- /dev/null +++ b/docs/ThreadResponse.md @@ -0,0 +1,49 @@ +# ThreadResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **int** | | +**last_message_id** | **str** | | [optional] +**flags** | **int** | | +**last_pin_timestamp** | **datetime** | | [optional] +**guild_id** | **str** | | +**name** | **str** | | +**parent_id** | **str** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**permissions** | **str** | | [optional] +**owner_id** | **str** | | +**thread_metadata** | [**ThreadMetadataResponse**](ThreadMetadataResponse.md) | | [optional] +**message_count** | **int** | | +**member_count** | **int** | | +**total_message_sent** | **int** | | +**applied_tags** | **List[str]** | | [optional] +**member** | [**ThreadMemberResponse**](ThreadMemberResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.thread_response import ThreadResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadResponse from a JSON string +thread_response_instance = ThreadResponse.from_json(json) +# print the JSON string representation of the object +print(ThreadResponse.to_json()) + +# convert the object into a dict +thread_response_dict = thread_response_instance.to_dict() +# create an instance of ThreadResponse from a dict +thread_response_from_dict = ThreadResponse.from_dict(thread_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadSearchResponse.md b/docs/ThreadSearchResponse.md new file mode 100644 index 0000000..7add631 --- /dev/null +++ b/docs/ThreadSearchResponse.md @@ -0,0 +1,33 @@ +# ThreadSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**threads** | [**List[ThreadResponse]**](ThreadResponse.md) | | +**members** | [**List[ThreadMemberResponse]**](ThreadMemberResponse.md) | | +**has_more** | **bool** | | [optional] +**first_messages** | [**List[MessageResponse]**](MessageResponse.md) | | [optional] +**total_results** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.thread_search_response import ThreadSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadSearchResponse from a JSON string +thread_search_response_instance = ThreadSearchResponse.from_json(json) +# print the JSON string representation of the object +print(ThreadSearchResponse.to_json()) + +# convert the object into a dict +thread_search_response_dict = thread_search_response_instance.to_dict() +# create an instance of ThreadSearchResponse from a dict +thread_search_response_from_dict = ThreadSearchResponse.from_dict(thread_search_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadSearchTagParameter.md b/docs/ThreadSearchTagParameter.md new file mode 100644 index 0000000..c368b6c --- /dev/null +++ b/docs/ThreadSearchTagParameter.md @@ -0,0 +1,28 @@ +# ThreadSearchTagParameter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadSearchTagParameter from a JSON string +thread_search_tag_parameter_instance = ThreadSearchTagParameter.from_json(json) +# print the JSON string representation of the object +print(ThreadSearchTagParameter.to_json()) + +# convert the object into a dict +thread_search_tag_parameter_dict = thread_search_tag_parameter_instance.to_dict() +# create an instance of ThreadSearchTagParameter from a dict +thread_search_tag_parameter_from_dict = ThreadSearchTagParameter.from_dict(thread_search_tag_parameter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThreadsResponse.md b/docs/ThreadsResponse.md new file mode 100644 index 0000000..7f170ea --- /dev/null +++ b/docs/ThreadsResponse.md @@ -0,0 +1,32 @@ +# ThreadsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**threads** | [**List[ThreadResponse]**](ThreadResponse.md) | | +**members** | [**List[ThreadMemberResponse]**](ThreadMemberResponse.md) | | +**has_more** | **bool** | | [optional] +**first_messages** | [**List[MessageResponse]**](MessageResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.threads_response import ThreadsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThreadsResponse from a JSON string +threads_response_instance = ThreadsResponse.from_json(json) +# print the JSON string representation of the object +print(ThreadsResponse.to_json()) + +# convert the object into a dict +threads_response_dict = threads_response_instance.to_dict() +# create an instance of ThreadsResponse from a dict +threads_response_from_dict = ThreadsResponse.from_dict(threads_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThumbnailComponentForMessageRequest.md b/docs/ThumbnailComponentForMessageRequest.md new file mode 100644 index 0000000..f79cd18 --- /dev/null +++ b/docs/ThumbnailComponentForMessageRequest.md @@ -0,0 +1,32 @@ +# ThumbnailComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**description** | **str** | | [optional] +**spoiler** | **bool** | | [optional] +**media** | [**UnfurledMediaRequest**](UnfurledMediaRequest.md) | | + +## Example + +```python +from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ThumbnailComponentForMessageRequest from a JSON string +thumbnail_component_for_message_request_instance = ThumbnailComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(ThumbnailComponentForMessageRequest.to_json()) + +# convert the object into a dict +thumbnail_component_for_message_request_dict = thumbnail_component_for_message_request_instance.to_dict() +# create an instance of ThumbnailComponentForMessageRequest from a dict +thumbnail_component_for_message_request_from_dict = ThumbnailComponentForMessageRequest.from_dict(thumbnail_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ThumbnailComponentResponse.md b/docs/ThumbnailComponentResponse.md new file mode 100644 index 0000000..db56309 --- /dev/null +++ b/docs/ThumbnailComponentResponse.md @@ -0,0 +1,33 @@ +# ThumbnailComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**media** | [**UnfurledMediaResponse**](UnfurledMediaResponse.md) | | +**description** | **str** | | [optional] +**spoiler** | **bool** | | + +## Example + +```python +from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ThumbnailComponentResponse from a JSON string +thumbnail_component_response_instance = ThumbnailComponentResponse.from_json(json) +# print the JSON string representation of the object +print(ThumbnailComponentResponse.to_json()) + +# convert the object into a dict +thumbnail_component_response_dict = thumbnail_component_response_instance.to_dict() +# create an instance of ThumbnailComponentResponse from a dict +thumbnail_component_response_from_dict = ThumbnailComponentResponse.from_dict(thumbnail_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnfurledMediaRequest.md b/docs/UnfurledMediaRequest.md new file mode 100644 index 0000000..478f5f5 --- /dev/null +++ b/docs/UnfurledMediaRequest.md @@ -0,0 +1,29 @@ +# UnfurledMediaRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | + +## Example + +```python +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnfurledMediaRequest from a JSON string +unfurled_media_request_instance = UnfurledMediaRequest.from_json(json) +# print the JSON string representation of the object +print(UnfurledMediaRequest.to_json()) + +# convert the object into a dict +unfurled_media_request_dict = unfurled_media_request_instance.to_dict() +# create an instance of UnfurledMediaRequest from a dict +unfurled_media_request_from_dict = UnfurledMediaRequest.from_dict(unfurled_media_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md b/docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md new file mode 100644 index 0000000..8ab5552 --- /dev/null +++ b/docs/UnfurledMediaRequestWithAttachmentReferenceRequired.md @@ -0,0 +1,29 @@ +# UnfurledMediaRequestWithAttachmentReferenceRequired + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | + +## Example + +```python +from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired + +# TODO update the JSON string below +json = "{}" +# create an instance of UnfurledMediaRequestWithAttachmentReferenceRequired from a JSON string +unfurled_media_request_with_attachment_reference_required_instance = UnfurledMediaRequestWithAttachmentReferenceRequired.from_json(json) +# print the JSON string representation of the object +print(UnfurledMediaRequestWithAttachmentReferenceRequired.to_json()) + +# convert the object into a dict +unfurled_media_request_with_attachment_reference_required_dict = unfurled_media_request_with_attachment_reference_required_instance.to_dict() +# create an instance of UnfurledMediaRequestWithAttachmentReferenceRequired from a dict +unfurled_media_request_with_attachment_reference_required_from_dict = UnfurledMediaRequestWithAttachmentReferenceRequired.from_dict(unfurled_media_request_with_attachment_reference_required_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnfurledMediaResponse.md b/docs/UnfurledMediaResponse.md new file mode 100644 index 0000000..bb13532 --- /dev/null +++ b/docs/UnfurledMediaResponse.md @@ -0,0 +1,35 @@ +# UnfurledMediaResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**url** | **str** | | +**proxy_url** | **str** | | +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**content_type** | **str** | | [optional] +**attachment_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UnfurledMediaResponse from a JSON string +unfurled_media_response_instance = UnfurledMediaResponse.from_json(json) +# print the JSON string representation of the object +print(UnfurledMediaResponse.to_json()) + +# convert the object into a dict +unfurled_media_response_dict = unfurled_media_response_instance.to_dict() +# create an instance of UnfurledMediaResponse from a dict +unfurled_media_response_from_dict = UnfurledMediaResponse.from_dict(unfurled_media_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateApplicationEmojiRequest.md b/docs/UpdateApplicationEmojiRequest.md new file mode 100644 index 0000000..323ada9 --- /dev/null +++ b/docs/UpdateApplicationEmojiRequest.md @@ -0,0 +1,29 @@ +# UpdateApplicationEmojiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateApplicationEmojiRequest from a JSON string +update_application_emoji_request_instance = UpdateApplicationEmojiRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateApplicationEmojiRequest.to_json()) + +# convert the object into a dict +update_application_emoji_request_dict = update_application_emoji_request_instance.to_dict() +# create an instance of UpdateApplicationEmojiRequest from a dict +update_application_emoji_request_from_dict = UpdateApplicationEmojiRequest.from_dict(update_application_emoji_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateApplicationUserRoleConnectionRequest.md b/docs/UpdateApplicationUserRoleConnectionRequest.md new file mode 100644 index 0000000..ed13633 --- /dev/null +++ b/docs/UpdateApplicationUserRoleConnectionRequest.md @@ -0,0 +1,31 @@ +# UpdateApplicationUserRoleConnectionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**platform_name** | **str** | | [optional] +**platform_username** | **str** | | [optional] +**metadata** | **Dict[str, str]** | | [optional] + +## Example + +```python +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateApplicationUserRoleConnectionRequest from a JSON string +update_application_user_role_connection_request_instance = UpdateApplicationUserRoleConnectionRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateApplicationUserRoleConnectionRequest.to_json()) + +# convert the object into a dict +update_application_user_role_connection_request_dict = update_application_user_role_connection_request_instance.to_dict() +# create an instance of UpdateApplicationUserRoleConnectionRequest from a dict +update_application_user_role_connection_request_from_dict = UpdateApplicationUserRoleConnectionRequest.from_dict(update_application_user_role_connection_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAutoModerationRuleRequest.md b/docs/UpdateAutoModerationRuleRequest.md new file mode 100644 index 0000000..d5c98a1 --- /dev/null +++ b/docs/UpdateAutoModerationRuleRequest.md @@ -0,0 +1,36 @@ +# UpdateAutoModerationRuleRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**event_type** | **int** | | [optional] +**actions** | [**List[DefaultKeywordListUpsertRequestActionsInner]**](DefaultKeywordListUpsertRequestActionsInner.md) | | [optional] +**enabled** | **bool** | | [optional] +**exempt_roles** | **List[str]** | | [optional] +**exempt_channels** | **List[str]** | | [optional] +**trigger_type** | **int** | | [optional] +**trigger_metadata** | [**MentionSpamTriggerMetadata**](MentionSpamTriggerMetadata.md) | | [optional] + +## Example + +```python +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAutoModerationRuleRequest from a JSON string +update_auto_moderation_rule_request_instance = UpdateAutoModerationRuleRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateAutoModerationRuleRequest.to_json()) + +# convert the object into a dict +update_auto_moderation_rule_request_dict = update_auto_moderation_rule_request_instance.to_dict() +# create an instance of UpdateAutoModerationRuleRequest from a dict +update_auto_moderation_rule_request_from_dict = UpdateAutoModerationRuleRequest.from_dict(update_auto_moderation_rule_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateChannelRequest.md b/docs/UpdateChannelRequest.md new file mode 100644 index 0000000..36e07f4 --- /dev/null +++ b/docs/UpdateChannelRequest.md @@ -0,0 +1,54 @@ +# UpdateChannelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**icon** | **str** | | [optional] +**type** | **int** | | [optional] +**position** | **int** | | [optional] +**topic** | **str** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**nsfw** | **bool** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**parent_id** | **str** | | [optional] +**permission_overwrites** | [**List[ChannelPermissionOverwriteRequest]**](ChannelPermissionOverwriteRequest.md) | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_reaction_emoji** | [**UpdateDefaultReactionEmojiRequest**](UpdateDefaultReactionEmojiRequest.md) | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**flags** | **int** | | [optional] +**available_tags** | [**List[UpdateThreadTagRequest]**](UpdateThreadTagRequest.md) | | [optional] +**archived** | **bool** | | [optional] +**locked** | **bool** | | [optional] +**invitable** | **bool** | | [optional] +**auto_archive_duration** | **int** | | [optional] +**applied_tags** | **List[str]** | | [optional] + +## Example + +```python +from dc_rest.models.update_channel_request import UpdateChannelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateChannelRequest from a JSON string +update_channel_request_instance = UpdateChannelRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateChannelRequest.to_json()) + +# convert the object into a dict +update_channel_request_dict = update_channel_request_instance.to_dict() +# create an instance of UpdateChannelRequest from a dict +update_channel_request_from_dict = UpdateChannelRequest.from_dict(update_channel_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDMRequestPartial.md b/docs/UpdateDMRequestPartial.md new file mode 100644 index 0000000..1da4df4 --- /dev/null +++ b/docs/UpdateDMRequestPartial.md @@ -0,0 +1,29 @@ +# UpdateDMRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDMRequestPartial from a JSON string +update_dm_request_partial_instance = UpdateDMRequestPartial.from_json(json) +# print the JSON string representation of the object +print(UpdateDMRequestPartial.to_json()) + +# convert the object into a dict +update_dm_request_partial_dict = update_dm_request_partial_instance.to_dict() +# create an instance of UpdateDMRequestPartial from a dict +update_dm_request_partial_from_dict = UpdateDMRequestPartial.from_dict(update_dm_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDefaultReactionEmojiRequest.md b/docs/UpdateDefaultReactionEmojiRequest.md new file mode 100644 index 0000000..8c22017 --- /dev/null +++ b/docs/UpdateDefaultReactionEmojiRequest.md @@ -0,0 +1,30 @@ +# UpdateDefaultReactionEmojiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDefaultReactionEmojiRequest from a JSON string +update_default_reaction_emoji_request_instance = UpdateDefaultReactionEmojiRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateDefaultReactionEmojiRequest.to_json()) + +# convert the object into a dict +update_default_reaction_emoji_request_dict = update_default_reaction_emoji_request_instance.to_dict() +# create an instance of UpdateDefaultReactionEmojiRequest from a dict +update_default_reaction_emoji_request_from_dict = UpdateDefaultReactionEmojiRequest.from_dict(update_default_reaction_emoji_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGroupDMRequestPartial.md b/docs/UpdateGroupDMRequestPartial.md new file mode 100644 index 0000000..a663282 --- /dev/null +++ b/docs/UpdateGroupDMRequestPartial.md @@ -0,0 +1,30 @@ +# UpdateGroupDMRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**icon** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGroupDMRequestPartial from a JSON string +update_group_dm_request_partial_instance = UpdateGroupDMRequestPartial.from_json(json) +# print the JSON string representation of the object +print(UpdateGroupDMRequestPartial.to_json()) + +# convert the object into a dict +update_group_dm_request_partial_dict = update_group_dm_request_partial_instance.to_dict() +# create an instance of UpdateGroupDMRequestPartial from a dict +update_group_dm_request_partial_from_dict = UpdateGroupDMRequestPartial.from_dict(update_group_dm_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildChannelRequestPartial.md b/docs/UpdateGuildChannelRequestPartial.md new file mode 100644 index 0000000..819af2c --- /dev/null +++ b/docs/UpdateGuildChannelRequestPartial.md @@ -0,0 +1,48 @@ +# UpdateGuildChannelRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | [optional] +**name** | **str** | | [optional] +**position** | **int** | | [optional] +**topic** | **str** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**nsfw** | **bool** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**parent_id** | **str** | | [optional] +**permission_overwrites** | [**List[ChannelPermissionOverwriteRequest]**](ChannelPermissionOverwriteRequest.md) | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] +**default_auto_archive_duration** | **int** | | [optional] +**default_reaction_emoji** | [**UpdateDefaultReactionEmojiRequest**](UpdateDefaultReactionEmojiRequest.md) | | [optional] +**default_thread_rate_limit_per_user** | **int** | | [optional] +**default_sort_order** | **int** | | [optional] +**default_forum_layout** | **int** | | [optional] +**default_tag_setting** | **str** | | [optional] +**flags** | **int** | | [optional] +**available_tags** | [**List[UpdateThreadTagRequest]**](UpdateThreadTagRequest.md) | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildChannelRequestPartial from a JSON string +update_guild_channel_request_partial_instance = UpdateGuildChannelRequestPartial.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildChannelRequestPartial.to_json()) + +# convert the object into a dict +update_guild_channel_request_partial_dict = update_guild_channel_request_partial_instance.to_dict() +# create an instance of UpdateGuildChannelRequestPartial from a dict +update_guild_channel_request_partial_from_dict = UpdateGuildChannelRequestPartial.from_dict(update_guild_channel_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildEmojiRequest.md b/docs/UpdateGuildEmojiRequest.md new file mode 100644 index 0000000..5c8fb5b --- /dev/null +++ b/docs/UpdateGuildEmojiRequest.md @@ -0,0 +1,30 @@ +# UpdateGuildEmojiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**roles** | **List[Optional[str]]** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildEmojiRequest from a JSON string +update_guild_emoji_request_instance = UpdateGuildEmojiRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildEmojiRequest.to_json()) + +# convert the object into a dict +update_guild_emoji_request_dict = update_guild_emoji_request_instance.to_dict() +# create an instance of UpdateGuildEmojiRequest from a dict +update_guild_emoji_request_from_dict = UpdateGuildEmojiRequest.from_dict(update_guild_emoji_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildMemberRequest.md b/docs/UpdateGuildMemberRequest.md new file mode 100644 index 0000000..234be40 --- /dev/null +++ b/docs/UpdateGuildMemberRequest.md @@ -0,0 +1,35 @@ +# UpdateGuildMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nick** | **str** | | [optional] +**roles** | **List[Optional[str]]** | | [optional] +**mute** | **bool** | | [optional] +**deaf** | **bool** | | [optional] +**channel_id** | **str** | | [optional] +**communication_disabled_until** | **datetime** | | [optional] +**flags** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildMemberRequest from a JSON string +update_guild_member_request_instance = UpdateGuildMemberRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildMemberRequest.to_json()) + +# convert the object into a dict +update_guild_member_request_dict = update_guild_member_request_instance.to_dict() +# create an instance of UpdateGuildMemberRequest from a dict +update_guild_member_request_from_dict = UpdateGuildMemberRequest.from_dict(update_guild_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildOnboardingRequest.md b/docs/UpdateGuildOnboardingRequest.md new file mode 100644 index 0000000..b0076d0 --- /dev/null +++ b/docs/UpdateGuildOnboardingRequest.md @@ -0,0 +1,32 @@ +# UpdateGuildOnboardingRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prompts** | [**List[UpdateOnboardingPromptRequest]**](UpdateOnboardingPromptRequest.md) | | [optional] +**enabled** | **bool** | | [optional] +**default_channel_ids** | **List[str]** | | [optional] +**mode** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildOnboardingRequest from a JSON string +update_guild_onboarding_request_instance = UpdateGuildOnboardingRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildOnboardingRequest.to_json()) + +# convert the object into a dict +update_guild_onboarding_request_dict = update_guild_onboarding_request_instance.to_dict() +# create an instance of UpdateGuildOnboardingRequest from a dict +update_guild_onboarding_request_from_dict = UpdateGuildOnboardingRequest.from_dict(update_guild_onboarding_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildScheduledEventRequest.md b/docs/UpdateGuildScheduledEventRequest.md new file mode 100644 index 0000000..158119b --- /dev/null +++ b/docs/UpdateGuildScheduledEventRequest.md @@ -0,0 +1,38 @@ +# UpdateGuildScheduledEventRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | [optional] +**scheduled_end_time** | **datetime** | | [optional] +**entity_type** | **int** | | [optional] +**privacy_level** | **object** | | [optional] +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildScheduledEventRequest from a JSON string +update_guild_scheduled_event_request_instance = UpdateGuildScheduledEventRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildScheduledEventRequest.to_json()) + +# convert the object into a dict +update_guild_scheduled_event_request_dict = update_guild_scheduled_event_request_instance.to_dict() +# create an instance of UpdateGuildScheduledEventRequest from a dict +update_guild_scheduled_event_request_from_dict = UpdateGuildScheduledEventRequest.from_dict(update_guild_scheduled_event_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildStickerRequest.md b/docs/UpdateGuildStickerRequest.md new file mode 100644 index 0000000..988580f --- /dev/null +++ b/docs/UpdateGuildStickerRequest.md @@ -0,0 +1,31 @@ +# UpdateGuildStickerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**tags** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildStickerRequest from a JSON string +update_guild_sticker_request_instance = UpdateGuildStickerRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildStickerRequest.to_json()) + +# convert the object into a dict +update_guild_sticker_request_dict = update_guild_sticker_request_instance.to_dict() +# create an instance of UpdateGuildStickerRequest from a dict +update_guild_sticker_request_from_dict = UpdateGuildStickerRequest.from_dict(update_guild_sticker_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildTemplateRequest.md b/docs/UpdateGuildTemplateRequest.md new file mode 100644 index 0000000..ff1ecbf --- /dev/null +++ b/docs/UpdateGuildTemplateRequest.md @@ -0,0 +1,30 @@ +# UpdateGuildTemplateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildTemplateRequest from a JSON string +update_guild_template_request_instance = UpdateGuildTemplateRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildTemplateRequest.to_json()) + +# convert the object into a dict +update_guild_template_request_dict = update_guild_template_request_instance.to_dict() +# create an instance of UpdateGuildTemplateRequest from a dict +update_guild_template_request_from_dict = UpdateGuildTemplateRequest.from_dict(update_guild_template_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGuildWidgetSettingsRequest.md b/docs/UpdateGuildWidgetSettingsRequest.md new file mode 100644 index 0000000..3e48538 --- /dev/null +++ b/docs/UpdateGuildWidgetSettingsRequest.md @@ -0,0 +1,30 @@ +# UpdateGuildWidgetSettingsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | [optional] +**enabled** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateGuildWidgetSettingsRequest from a JSON string +update_guild_widget_settings_request_instance = UpdateGuildWidgetSettingsRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateGuildWidgetSettingsRequest.to_json()) + +# convert the object into a dict +update_guild_widget_settings_request_dict = update_guild_widget_settings_request_instance.to_dict() +# create an instance of UpdateGuildWidgetSettingsRequest from a dict +update_guild_widget_settings_request_from_dict = UpdateGuildWidgetSettingsRequest.from_dict(update_guild_widget_settings_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMessageInteractionCallbackRequest.md b/docs/UpdateMessageInteractionCallbackRequest.md new file mode 100644 index 0000000..5227a0d --- /dev/null +++ b/docs/UpdateMessageInteractionCallbackRequest.md @@ -0,0 +1,30 @@ +# UpdateMessageInteractionCallbackRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**data** | [**IncomingWebhookUpdateForInteractionCallbackRequestPartial**](IncomingWebhookUpdateForInteractionCallbackRequestPartial.md) | | [optional] + +## Example + +```python +from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMessageInteractionCallbackRequest from a JSON string +update_message_interaction_callback_request_instance = UpdateMessageInteractionCallbackRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateMessageInteractionCallbackRequest.to_json()) + +# convert the object into a dict +update_message_interaction_callback_request_dict = update_message_interaction_callback_request_instance.to_dict() +# create an instance of UpdateMessageInteractionCallbackRequest from a dict +update_message_interaction_callback_request_from_dict = UpdateMessageInteractionCallbackRequest.from_dict(update_message_interaction_callback_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMessageInteractionCallbackResponse.md b/docs/UpdateMessageInteractionCallbackResponse.md new file mode 100644 index 0000000..2d72a13 --- /dev/null +++ b/docs/UpdateMessageInteractionCallbackResponse.md @@ -0,0 +1,30 @@ +# UpdateMessageInteractionCallbackResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**message** | [**MessageResponse**](MessageResponse.md) | | + +## Example + +```python +from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMessageInteractionCallbackResponse from a JSON string +update_message_interaction_callback_response_instance = UpdateMessageInteractionCallbackResponse.from_json(json) +# print the JSON string representation of the object +print(UpdateMessageInteractionCallbackResponse.to_json()) + +# convert the object into a dict +update_message_interaction_callback_response_dict = update_message_interaction_callback_response_instance.to_dict() +# create an instance of UpdateMessageInteractionCallbackResponse from a dict +update_message_interaction_callback_response_from_dict = UpdateMessageInteractionCallbackResponse.from_dict(update_message_interaction_callback_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateMyGuildMemberRequest.md b/docs/UpdateMyGuildMemberRequest.md new file mode 100644 index 0000000..d0a130b --- /dev/null +++ b/docs/UpdateMyGuildMemberRequest.md @@ -0,0 +1,29 @@ +# UpdateMyGuildMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nick** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMyGuildMemberRequest from a JSON string +update_my_guild_member_request_instance = UpdateMyGuildMemberRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateMyGuildMemberRequest.to_json()) + +# convert the object into a dict +update_my_guild_member_request_dict = update_my_guild_member_request_instance.to_dict() +# create an instance of UpdateMyGuildMemberRequest from a dict +update_my_guild_member_request_from_dict = UpdateMyGuildMemberRequest.from_dict(update_my_guild_member_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOnboardingPromptRequest.md b/docs/UpdateOnboardingPromptRequest.md new file mode 100644 index 0000000..12accb1 --- /dev/null +++ b/docs/UpdateOnboardingPromptRequest.md @@ -0,0 +1,35 @@ +# UpdateOnboardingPromptRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | +**options** | [**List[OnboardingPromptOptionRequest]**](OnboardingPromptOptionRequest.md) | | +**single_select** | **bool** | | [optional] +**required** | **bool** | | [optional] +**in_onboarding** | **bool** | | [optional] +**type** | **int** | | [optional] +**id** | **str** | | + +## Example + +```python +from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOnboardingPromptRequest from a JSON string +update_onboarding_prompt_request_instance = UpdateOnboardingPromptRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateOnboardingPromptRequest.to_json()) + +# convert the object into a dict +update_onboarding_prompt_request_dict = update_onboarding_prompt_request_instance.to_dict() +# create an instance of UpdateOnboardingPromptRequest from a dict +update_onboarding_prompt_request_from_dict = UpdateOnboardingPromptRequest.from_dict(update_onboarding_prompt_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateSelfVoiceStateRequest.md b/docs/UpdateSelfVoiceStateRequest.md new file mode 100644 index 0000000..e874d5e --- /dev/null +++ b/docs/UpdateSelfVoiceStateRequest.md @@ -0,0 +1,31 @@ +# UpdateSelfVoiceStateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_to_speak_timestamp** | **datetime** | | [optional] +**suppress** | **bool** | | [optional] +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSelfVoiceStateRequest from a JSON string +update_self_voice_state_request_instance = UpdateSelfVoiceStateRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateSelfVoiceStateRequest.to_json()) + +# convert the object into a dict +update_self_voice_state_request_dict = update_self_voice_state_request_instance.to_dict() +# create an instance of UpdateSelfVoiceStateRequest from a dict +update_self_voice_state_request_from_dict = UpdateSelfVoiceStateRequest.from_dict(update_self_voice_state_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateStageInstanceRequest.md b/docs/UpdateStageInstanceRequest.md new file mode 100644 index 0000000..4993d37 --- /dev/null +++ b/docs/UpdateStageInstanceRequest.md @@ -0,0 +1,30 @@ +# UpdateStageInstanceRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic** | **str** | | [optional] +**privacy_level** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStageInstanceRequest from a JSON string +update_stage_instance_request_instance = UpdateStageInstanceRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateStageInstanceRequest.to_json()) + +# convert the object into a dict +update_stage_instance_request_dict = update_stage_instance_request_instance.to_dict() +# create an instance of UpdateStageInstanceRequest from a dict +update_stage_instance_request_from_dict = UpdateStageInstanceRequest.from_dict(update_stage_instance_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateThreadRequestPartial.md b/docs/UpdateThreadRequestPartial.md new file mode 100644 index 0000000..d2d22cf --- /dev/null +++ b/docs/UpdateThreadRequestPartial.md @@ -0,0 +1,40 @@ +# UpdateThreadRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**archived** | **bool** | | [optional] +**locked** | **bool** | | [optional] +**invitable** | **bool** | | [optional] +**auto_archive_duration** | **int** | | [optional] +**rate_limit_per_user** | **int** | | [optional] +**flags** | **int** | | [optional] +**applied_tags** | **List[str]** | | [optional] +**bitrate** | **int** | | [optional] +**user_limit** | **int** | | [optional] +**rtc_region** | **str** | | [optional] +**video_quality_mode** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateThreadRequestPartial from a JSON string +update_thread_request_partial_instance = UpdateThreadRequestPartial.from_json(json) +# print the JSON string representation of the object +print(UpdateThreadRequestPartial.to_json()) + +# convert the object into a dict +update_thread_request_partial_dict = update_thread_request_partial_instance.to_dict() +# create an instance of UpdateThreadRequestPartial from a dict +update_thread_request_partial_from_dict = UpdateThreadRequestPartial.from_dict(update_thread_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateThreadTagRequest.md b/docs/UpdateThreadTagRequest.md new file mode 100644 index 0000000..9b6ada8 --- /dev/null +++ b/docs/UpdateThreadTagRequest.md @@ -0,0 +1,33 @@ +# UpdateThreadTagRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**emoji_id** | **str** | | [optional] +**emoji_name** | **str** | | [optional] +**moderated** | **bool** | | [optional] +**id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateThreadTagRequest from a JSON string +update_thread_tag_request_instance = UpdateThreadTagRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateThreadTagRequest.to_json()) + +# convert the object into a dict +update_thread_tag_request_dict = update_thread_tag_request_instance.to_dict() +# create an instance of UpdateThreadTagRequest from a dict +update_thread_tag_request_from_dict = UpdateThreadTagRequest.from_dict(update_thread_tag_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateVoiceStateRequest.md b/docs/UpdateVoiceStateRequest.md new file mode 100644 index 0000000..36526a2 --- /dev/null +++ b/docs/UpdateVoiceStateRequest.md @@ -0,0 +1,30 @@ +# UpdateVoiceStateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suppress** | **bool** | | [optional] +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateVoiceStateRequest from a JSON string +update_voice_state_request_instance = UpdateVoiceStateRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateVoiceStateRequest.to_json()) + +# convert the object into a dict +update_voice_state_request_dict = update_voice_state_request_instance.to_dict() +# create an instance of UpdateVoiceStateRequest from a dict +update_voice_state_request_from_dict = UpdateVoiceStateRequest.from_dict(update_voice_state_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateWebhookByTokenRequest.md b/docs/UpdateWebhookByTokenRequest.md new file mode 100644 index 0000000..ab821ca --- /dev/null +++ b/docs/UpdateWebhookByTokenRequest.md @@ -0,0 +1,30 @@ +# UpdateWebhookByTokenRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**avatar** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateWebhookByTokenRequest from a JSON string +update_webhook_by_token_request_instance = UpdateWebhookByTokenRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateWebhookByTokenRequest.to_json()) + +# convert the object into a dict +update_webhook_by_token_request_dict = update_webhook_by_token_request_instance.to_dict() +# create an instance of UpdateWebhookByTokenRequest from a dict +update_webhook_by_token_request_from_dict = UpdateWebhookByTokenRequest.from_dict(update_webhook_by_token_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md new file mode 100644 index 0000000..9b2d4ab --- /dev/null +++ b/docs/UpdateWebhookRequest.md @@ -0,0 +1,31 @@ +# UpdateWebhookRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**avatar** | **str** | | [optional] +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.update_webhook_request import UpdateWebhookRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateWebhookRequest from a JSON string +update_webhook_request_instance = UpdateWebhookRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateWebhookRequest.to_json()) + +# convert the object into a dict +update_webhook_request_dict = update_webhook_request_instance.to_dict() +# create an instance of UpdateWebhookRequest from a dict +update_webhook_request_from_dict = UpdateWebhookRequest.from_dict(update_webhook_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAvatarDecorationResponse.md b/docs/UserAvatarDecorationResponse.md new file mode 100644 index 0000000..2d1e98a --- /dev/null +++ b/docs/UserAvatarDecorationResponse.md @@ -0,0 +1,30 @@ +# UserAvatarDecorationResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**sku_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvatarDecorationResponse from a JSON string +user_avatar_decoration_response_instance = UserAvatarDecorationResponse.from_json(json) +# print the JSON string representation of the object +print(UserAvatarDecorationResponse.to_json()) + +# convert the object into a dict +user_avatar_decoration_response_dict = user_avatar_decoration_response_instance.to_dict() +# create an instance of UserAvatarDecorationResponse from a dict +user_avatar_decoration_response_from_dict = UserAvatarDecorationResponse.from_dict(user_avatar_decoration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCollectiblesResponse.md b/docs/UserCollectiblesResponse.md new file mode 100644 index 0000000..1376b7c --- /dev/null +++ b/docs/UserCollectiblesResponse.md @@ -0,0 +1,29 @@ +# UserCollectiblesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nameplate** | [**UserNameplateResponse**](UserNameplateResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCollectiblesResponse from a JSON string +user_collectibles_response_instance = UserCollectiblesResponse.from_json(json) +# print the JSON string representation of the object +print(UserCollectiblesResponse.to_json()) + +# convert the object into a dict +user_collectibles_response_dict = user_collectibles_response_instance.to_dict() +# create an instance of UserCollectiblesResponse from a dict +user_collectibles_response_from_dict = UserCollectiblesResponse.from_dict(user_collectibles_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunicationDisabledAction.md b/docs/UserCommunicationDisabledAction.md new file mode 100644 index 0000000..ec476c1 --- /dev/null +++ b/docs/UserCommunicationDisabledAction.md @@ -0,0 +1,30 @@ +# UserCommunicationDisabledAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**UserCommunicationDisabledActionMetadata**](UserCommunicationDisabledActionMetadata.md) | | + +## Example + +```python +from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCommunicationDisabledAction from a JSON string +user_communication_disabled_action_instance = UserCommunicationDisabledAction.from_json(json) +# print the JSON string representation of the object +print(UserCommunicationDisabledAction.to_json()) + +# convert the object into a dict +user_communication_disabled_action_dict = user_communication_disabled_action_instance.to_dict() +# create an instance of UserCommunicationDisabledAction from a dict +user_communication_disabled_action_from_dict = UserCommunicationDisabledAction.from_dict(user_communication_disabled_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunicationDisabledActionMetadata.md b/docs/UserCommunicationDisabledActionMetadata.md new file mode 100644 index 0000000..52694c0 --- /dev/null +++ b/docs/UserCommunicationDisabledActionMetadata.md @@ -0,0 +1,29 @@ +# UserCommunicationDisabledActionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**duration_seconds** | **int** | | [optional] + +## Example + +```python +from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCommunicationDisabledActionMetadata from a JSON string +user_communication_disabled_action_metadata_instance = UserCommunicationDisabledActionMetadata.from_json(json) +# print the JSON string representation of the object +print(UserCommunicationDisabledActionMetadata.to_json()) + +# convert the object into a dict +user_communication_disabled_action_metadata_dict = user_communication_disabled_action_metadata_instance.to_dict() +# create an instance of UserCommunicationDisabledActionMetadata from a dict +user_communication_disabled_action_metadata_from_dict = UserCommunicationDisabledActionMetadata.from_dict(user_communication_disabled_action_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunicationDisabledActionMetadataResponse.md b/docs/UserCommunicationDisabledActionMetadataResponse.md new file mode 100644 index 0000000..10e175d --- /dev/null +++ b/docs/UserCommunicationDisabledActionMetadataResponse.md @@ -0,0 +1,29 @@ +# UserCommunicationDisabledActionMetadataResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**duration_seconds** | **int** | | + +## Example + +```python +from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCommunicationDisabledActionMetadataResponse from a JSON string +user_communication_disabled_action_metadata_response_instance = UserCommunicationDisabledActionMetadataResponse.from_json(json) +# print the JSON string representation of the object +print(UserCommunicationDisabledActionMetadataResponse.to_json()) + +# convert the object into a dict +user_communication_disabled_action_metadata_response_dict = user_communication_disabled_action_metadata_response_instance.to_dict() +# create an instance of UserCommunicationDisabledActionMetadataResponse from a dict +user_communication_disabled_action_metadata_response_from_dict = UserCommunicationDisabledActionMetadataResponse.from_dict(user_communication_disabled_action_metadata_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunicationDisabledActionResponse.md b/docs/UserCommunicationDisabledActionResponse.md new file mode 100644 index 0000000..8e4b179 --- /dev/null +++ b/docs/UserCommunicationDisabledActionResponse.md @@ -0,0 +1,30 @@ +# UserCommunicationDisabledActionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**metadata** | [**UserCommunicationDisabledActionMetadataResponse**](UserCommunicationDisabledActionMetadataResponse.md) | | + +## Example + +```python +from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCommunicationDisabledActionResponse from a JSON string +user_communication_disabled_action_response_instance = UserCommunicationDisabledActionResponse.from_json(json) +# print the JSON string representation of the object +print(UserCommunicationDisabledActionResponse.to_json()) + +# convert the object into a dict +user_communication_disabled_action_response_dict = user_communication_disabled_action_response_instance.to_dict() +# create an instance of UserCommunicationDisabledActionResponse from a dict +user_communication_disabled_action_response_from_dict = UserCommunicationDisabledActionResponse.from_dict(user_communication_disabled_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserGuildOnboardingResponse.md b/docs/UserGuildOnboardingResponse.md new file mode 100644 index 0000000..784c1b6 --- /dev/null +++ b/docs/UserGuildOnboardingResponse.md @@ -0,0 +1,32 @@ +# UserGuildOnboardingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guild_id** | **str** | | +**prompts** | [**List[OnboardingPromptResponse]**](OnboardingPromptResponse.md) | | +**default_channel_ids** | **List[str]** | | +**enabled** | **bool** | | + +## Example + +```python +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserGuildOnboardingResponse from a JSON string +user_guild_onboarding_response_instance = UserGuildOnboardingResponse.from_json(json) +# print the JSON string representation of the object +print(UserGuildOnboardingResponse.to_json()) + +# convert the object into a dict +user_guild_onboarding_response_dict = user_guild_onboarding_response_instance.to_dict() +# create an instance of UserGuildOnboardingResponse from a dict +user_guild_onboarding_response_from_dict = UserGuildOnboardingResponse.from_dict(user_guild_onboarding_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserNameplateResponse.md b/docs/UserNameplateResponse.md new file mode 100644 index 0000000..9b8debd --- /dev/null +++ b/docs/UserNameplateResponse.md @@ -0,0 +1,32 @@ +# UserNameplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sku_id** | **str** | | [optional] +**asset** | **str** | | [optional] +**label** | **str** | | [optional] +**palette** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.user_nameplate_response import UserNameplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserNameplateResponse from a JSON string +user_nameplate_response_instance = UserNameplateResponse.from_json(json) +# print the JSON string representation of the object +print(UserNameplateResponse.to_json()) + +# convert the object into a dict +user_nameplate_response_dict = user_nameplate_response_instance.to_dict() +# create an instance of UserNameplateResponse from a dict +user_nameplate_response_from_dict = UserNameplateResponse.from_dict(user_nameplate_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserPIIResponse.md b/docs/UserPIIResponse.md new file mode 100644 index 0000000..97ee787 --- /dev/null +++ b/docs/UserPIIResponse.md @@ -0,0 +1,47 @@ +# UserPIIResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**username** | **str** | | +**avatar** | **str** | | [optional] +**discriminator** | **str** | | +**public_flags** | **int** | | +**flags** | **int** | | +**bot** | **bool** | | [optional] +**system** | **bool** | | [optional] +**banner** | **str** | | [optional] +**accent_color** | **int** | | [optional] +**global_name** | **str** | | [optional] +**avatar_decoration_data** | [**UserAvatarDecorationResponse**](UserAvatarDecorationResponse.md) | | [optional] +**collectibles** | [**UserCollectiblesResponse**](UserCollectiblesResponse.md) | | [optional] +**primary_guild** | [**UserPrimaryGuildResponse**](UserPrimaryGuildResponse.md) | | [optional] +**mfa_enabled** | **bool** | | +**locale** | **str** | | +**premium_type** | **int** | | [optional] +**email** | **str** | | [optional] +**verified** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.user_pii_response import UserPIIResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserPIIResponse from a JSON string +user_pii_response_instance = UserPIIResponse.from_json(json) +# print the JSON string representation of the object +print(UserPIIResponse.to_json()) + +# convert the object into a dict +user_pii_response_dict = user_pii_response_instance.to_dict() +# create an instance of UserPIIResponse from a dict +user_pii_response_from_dict = UserPIIResponse.from_dict(user_pii_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserPrimaryGuildResponse.md b/docs/UserPrimaryGuildResponse.md new file mode 100644 index 0000000..4396549 --- /dev/null +++ b/docs/UserPrimaryGuildResponse.md @@ -0,0 +1,32 @@ +# UserPrimaryGuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity_guild_id** | **str** | | [optional] +**identity_enabled** | **bool** | | [optional] +**tag** | **str** | | [optional] +**badge** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserPrimaryGuildResponse from a JSON string +user_primary_guild_response_instance = UserPrimaryGuildResponse.from_json(json) +# print the JSON string representation of the object +print(UserPrimaryGuildResponse.to_json()) + +# convert the object into a dict +user_primary_guild_response_dict = user_primary_guild_response_instance.to_dict() +# create an instance of UserPrimaryGuildResponse from a dict +user_primary_guild_response_from_dict = UserPrimaryGuildResponse.from_dict(user_primary_guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserResponse.md b/docs/UserResponse.md new file mode 100644 index 0000000..60fbbb5 --- /dev/null +++ b/docs/UserResponse.md @@ -0,0 +1,42 @@ +# UserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**username** | **str** | | +**avatar** | **str** | | [optional] +**discriminator** | **str** | | +**public_flags** | **int** | | +**flags** | **int** | | +**bot** | **bool** | | [optional] +**system** | **bool** | | [optional] +**banner** | **str** | | [optional] +**accent_color** | **int** | | [optional] +**global_name** | **str** | | [optional] +**avatar_decoration_data** | [**UserAvatarDecorationResponse**](UserAvatarDecorationResponse.md) | | [optional] +**collectibles** | [**UserCollectiblesResponse**](UserCollectiblesResponse.md) | | [optional] +**primary_guild** | [**UserPrimaryGuildResponse**](UserPrimaryGuildResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.user_response import UserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserResponse from a JSON string +user_response_instance = UserResponse.from_json(json) +# print the JSON string representation of the object +print(UserResponse.to_json()) + +# convert the object into a dict +user_response_dict = user_response_instance.to_dict() +# create an instance of UserResponse from a dict +user_response_from_dict = UserResponse.from_dict(user_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSelectComponentForMessageRequest.md b/docs/UserSelectComponentForMessageRequest.md new file mode 100644 index 0000000..a822a17 --- /dev/null +++ b/docs/UserSelectComponentForMessageRequest.md @@ -0,0 +1,35 @@ +# UserSelectComponentForMessageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[UserSelectDefaultValue]**](UserSelectDefaultValue.md) | | [optional] + +## Example + +```python +from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSelectComponentForMessageRequest from a JSON string +user_select_component_for_message_request_instance = UserSelectComponentForMessageRequest.from_json(json) +# print the JSON string representation of the object +print(UserSelectComponentForMessageRequest.to_json()) + +# convert the object into a dict +user_select_component_for_message_request_dict = user_select_component_for_message_request_instance.to_dict() +# create an instance of UserSelectComponentForMessageRequest from a dict +user_select_component_for_message_request_from_dict = UserSelectComponentForMessageRequest.from_dict(user_select_component_for_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSelectComponentResponse.md b/docs/UserSelectComponentResponse.md new file mode 100644 index 0000000..a84307a --- /dev/null +++ b/docs/UserSelectComponentResponse.md @@ -0,0 +1,36 @@ +# UserSelectComponentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **int** | | +**id** | **int** | | +**custom_id** | **str** | | +**placeholder** | **str** | | [optional] +**min_values** | **int** | | [optional] +**max_values** | **int** | | [optional] +**disabled** | **bool** | | [optional] +**default_values** | [**List[UserSelectDefaultValueResponse]**](UserSelectDefaultValueResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.user_select_component_response import UserSelectComponentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSelectComponentResponse from a JSON string +user_select_component_response_instance = UserSelectComponentResponse.from_json(json) +# print the JSON string representation of the object +print(UserSelectComponentResponse.to_json()) + +# convert the object into a dict +user_select_component_response_dict = user_select_component_response_instance.to_dict() +# create an instance of UserSelectComponentResponse from a dict +user_select_component_response_from_dict = UserSelectComponentResponse.from_dict(user_select_component_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSelectDefaultValue.md b/docs/UserSelectDefaultValue.md new file mode 100644 index 0000000..da382a4 --- /dev/null +++ b/docs/UserSelectDefaultValue.md @@ -0,0 +1,30 @@ +# UserSelectDefaultValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.user_select_default_value import UserSelectDefaultValue + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSelectDefaultValue from a JSON string +user_select_default_value_instance = UserSelectDefaultValue.from_json(json) +# print the JSON string representation of the object +print(UserSelectDefaultValue.to_json()) + +# convert the object into a dict +user_select_default_value_dict = user_select_default_value_instance.to_dict() +# create an instance of UserSelectDefaultValue from a dict +user_select_default_value_from_dict = UserSelectDefaultValue.from_dict(user_select_default_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSelectDefaultValueResponse.md b/docs/UserSelectDefaultValueResponse.md new file mode 100644 index 0000000..9682902 --- /dev/null +++ b/docs/UserSelectDefaultValueResponse.md @@ -0,0 +1,30 @@ +# UserSelectDefaultValueResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**id** | **str** | | + +## Example + +```python +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSelectDefaultValueResponse from a JSON string +user_select_default_value_response_instance = UserSelectDefaultValueResponse.from_json(json) +# print the JSON string representation of the object +print(UserSelectDefaultValueResponse.to_json()) + +# convert the object into a dict +user_select_default_value_response_dict = user_select_default_value_response_instance.to_dict() +# create an instance of UserSelectDefaultValueResponse from a dict +user_select_default_value_response_from_dict = UserSelectDefaultValueResponse.from_dict(user_select_default_value_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VanityURLErrorResponse.md b/docs/VanityURLErrorResponse.md new file mode 100644 index 0000000..8b4c864 --- /dev/null +++ b/docs/VanityURLErrorResponse.md @@ -0,0 +1,30 @@ +# VanityURLErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**code** | **int** | | + +## Example + +```python +from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VanityURLErrorResponse from a JSON string +vanity_url_error_response_instance = VanityURLErrorResponse.from_json(json) +# print the JSON string representation of the object +print(VanityURLErrorResponse.to_json()) + +# convert the object into a dict +vanity_url_error_response_dict = vanity_url_error_response_instance.to_dict() +# create an instance of VanityURLErrorResponse from a dict +vanity_url_error_response_from_dict = VanityURLErrorResponse.from_dict(vanity_url_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VanityURLResponse.md b/docs/VanityURLResponse.md new file mode 100644 index 0000000..a102b6a --- /dev/null +++ b/docs/VanityURLResponse.md @@ -0,0 +1,31 @@ +# VanityURLResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | [optional] +**uses** | **int** | | +**error** | [**VanityURLErrorResponse**](VanityURLErrorResponse.md) | | [optional] + +## Example + +```python +from dc_rest.models.vanity_url_response import VanityURLResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VanityURLResponse from a JSON string +vanity_url_response_instance = VanityURLResponse.from_json(json) +# print the JSON string representation of the object +print(VanityURLResponse.to_json()) + +# convert the object into a dict +vanity_url_response_dict = vanity_url_response_instance.to_dict() +# create an instance of VanityURLResponse from a dict +vanity_url_response_from_dict = VanityURLResponse.from_dict(vanity_url_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VoiceRegionResponse.md b/docs/VoiceRegionResponse.md new file mode 100644 index 0000000..bbb9512 --- /dev/null +++ b/docs/VoiceRegionResponse.md @@ -0,0 +1,33 @@ +# VoiceRegionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**custom** | **bool** | | +**deprecated** | **bool** | | +**optimal** | **bool** | | + +## Example + +```python +from dc_rest.models.voice_region_response import VoiceRegionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceRegionResponse from a JSON string +voice_region_response_instance = VoiceRegionResponse.from_json(json) +# print the JSON string representation of the object +print(VoiceRegionResponse.to_json()) + +# convert the object into a dict +voice_region_response_dict = voice_region_response_instance.to_dict() +# create an instance of VoiceRegionResponse from a dict +voice_region_response_from_dict = VoiceRegionResponse.from_dict(voice_region_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VoiceScheduledEventCreateRequest.md b/docs/VoiceScheduledEventCreateRequest.md new file mode 100644 index 0000000..4220a1c --- /dev/null +++ b/docs/VoiceScheduledEventCreateRequest.md @@ -0,0 +1,37 @@ +# VoiceScheduledEventCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**privacy_level** | **object** | | +**entity_type** | **int** | | +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceScheduledEventCreateRequest from a JSON string +voice_scheduled_event_create_request_instance = VoiceScheduledEventCreateRequest.from_json(json) +# print the JSON string representation of the object +print(VoiceScheduledEventCreateRequest.to_json()) + +# convert the object into a dict +voice_scheduled_event_create_request_dict = voice_scheduled_event_create_request_instance.to_dict() +# create an instance of VoiceScheduledEventCreateRequest from a dict +voice_scheduled_event_create_request_from_dict = VoiceScheduledEventCreateRequest.from_dict(voice_scheduled_event_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VoiceScheduledEventPatchRequestPartial.md b/docs/VoiceScheduledEventPatchRequestPartial.md new file mode 100644 index 0000000..a7bd4f3 --- /dev/null +++ b/docs/VoiceScheduledEventPatchRequestPartial.md @@ -0,0 +1,38 @@ +# VoiceScheduledEventPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | [optional] +**scheduled_end_time** | **datetime** | | [optional] +**entity_type** | **int** | | [optional] +**privacy_level** | **object** | | [optional] +**channel_id** | **str** | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceScheduledEventPatchRequestPartial from a JSON string +voice_scheduled_event_patch_request_partial_instance = VoiceScheduledEventPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(VoiceScheduledEventPatchRequestPartial.to_json()) + +# convert the object into a dict +voice_scheduled_event_patch_request_partial_dict = voice_scheduled_event_patch_request_partial_instance.to_dict() +# create an instance of VoiceScheduledEventPatchRequestPartial from a dict +voice_scheduled_event_patch_request_partial_from_dict = VoiceScheduledEventPatchRequestPartial.from_dict(voice_scheduled_event_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VoiceScheduledEventResponse.md b/docs/VoiceScheduledEventResponse.md new file mode 100644 index 0000000..089b41f --- /dev/null +++ b/docs/VoiceScheduledEventResponse.md @@ -0,0 +1,45 @@ +# VoiceScheduledEventResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**guild_id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**channel_id** | **str** | | [optional] +**creator_id** | **str** | | [optional] +**creator** | [**UserResponse**](UserResponse.md) | | [optional] +**image** | **str** | | [optional] +**scheduled_start_time** | **datetime** | | +**scheduled_end_time** | **datetime** | | [optional] +**status** | **int** | | +**entity_type** | **int** | | +**entity_id** | **str** | | [optional] +**user_count** | **int** | | [optional] +**privacy_level** | **object** | | +**user_rsvp** | [**ScheduledEventUserResponse**](ScheduledEventUserResponse.md) | | [optional] +**entity_metadata** | **object** | | [optional] + +## Example + +```python +from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceScheduledEventResponse from a JSON string +voice_scheduled_event_response_instance = VoiceScheduledEventResponse.from_json(json) +# print the JSON string representation of the object +print(VoiceScheduledEventResponse.to_json()) + +# convert the object into a dict +voice_scheduled_event_response_dict = voice_scheduled_event_response_instance.to_dict() +# create an instance of VoiceScheduledEventResponse from a dict +voice_scheduled_event_response_from_dict = VoiceScheduledEventResponse.from_dict(voice_scheduled_event_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VoiceStateResponse.md b/docs/VoiceStateResponse.md new file mode 100644 index 0000000..2eef875 --- /dev/null +++ b/docs/VoiceStateResponse.md @@ -0,0 +1,41 @@ +# VoiceStateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel_id** | **str** | | [optional] +**deaf** | **bool** | | +**guild_id** | **str** | | [optional] +**member** | [**GuildMemberResponse**](GuildMemberResponse.md) | | [optional] +**mute** | **bool** | | +**request_to_speak_timestamp** | **datetime** | | [optional] +**suppress** | **bool** | | +**self_stream** | **bool** | | [optional] +**self_deaf** | **bool** | | +**self_mute** | **bool** | | +**self_video** | **bool** | | +**session_id** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from dc_rest.models.voice_state_response import VoiceStateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceStateResponse from a JSON string +voice_state_response_instance = VoiceStateResponse.from_json(json) +# print the JSON string representation of the object +print(VoiceStateResponse.to_json()) + +# convert the object into a dict +voice_state_response_dict = voice_state_response_instance.to_dict() +# create an instance of VoiceStateResponse from a dict +voice_state_response_from_dict = VoiceStateResponse.from_dict(voice_state_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookSlackEmbed.md b/docs/WebhookSlackEmbed.md new file mode 100644 index 0000000..241a12a --- /dev/null +++ b/docs/WebhookSlackEmbed.md @@ -0,0 +1,42 @@ +# WebhookSlackEmbed + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**title_link** | **str** | | [optional] +**text** | **str** | | [optional] +**color** | **str** | | [optional] +**ts** | **int** | | [optional] +**pretext** | **str** | | [optional] +**footer** | **str** | | [optional] +**footer_icon** | **str** | | [optional] +**author_name** | **str** | | [optional] +**author_link** | **str** | | [optional] +**author_icon** | **str** | | [optional] +**image_url** | **str** | | [optional] +**thumb_url** | **str** | | [optional] +**fields** | [**List[WebhookSlackEmbedField]**](WebhookSlackEmbedField.md) | | [optional] + +## Example + +```python +from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookSlackEmbed from a JSON string +webhook_slack_embed_instance = WebhookSlackEmbed.from_json(json) +# print the JSON string representation of the object +print(WebhookSlackEmbed.to_json()) + +# convert the object into a dict +webhook_slack_embed_dict = webhook_slack_embed_instance.to_dict() +# create an instance of WebhookSlackEmbed from a dict +webhook_slack_embed_from_dict = WebhookSlackEmbed.from_dict(webhook_slack_embed_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookSlackEmbedField.md b/docs/WebhookSlackEmbedField.md new file mode 100644 index 0000000..3dbf95f --- /dev/null +++ b/docs/WebhookSlackEmbedField.md @@ -0,0 +1,31 @@ +# WebhookSlackEmbedField + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **str** | | [optional] +**inline** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookSlackEmbedField from a JSON string +webhook_slack_embed_field_instance = WebhookSlackEmbedField.from_json(json) +# print the JSON string representation of the object +print(WebhookSlackEmbedField.to_json()) + +# convert the object into a dict +webhook_slack_embed_field_dict = webhook_slack_embed_field_instance.to_dict() +# create an instance of WebhookSlackEmbedField from a dict +webhook_slack_embed_field_from_dict = WebhookSlackEmbedField.from_dict(webhook_slack_embed_field_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookSourceChannelResponse.md b/docs/WebhookSourceChannelResponse.md new file mode 100644 index 0000000..d4b9f53 --- /dev/null +++ b/docs/WebhookSourceChannelResponse.md @@ -0,0 +1,30 @@ +# WebhookSourceChannelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | + +## Example + +```python +from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookSourceChannelResponse from a JSON string +webhook_source_channel_response_instance = WebhookSourceChannelResponse.from_json(json) +# print the JSON string representation of the object +print(WebhookSourceChannelResponse.to_json()) + +# convert the object into a dict +webhook_source_channel_response_dict = webhook_source_channel_response_instance.to_dict() +# create an instance of WebhookSourceChannelResponse from a dict +webhook_source_channel_response_from_dict = WebhookSourceChannelResponse.from_dict(webhook_source_channel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookSourceGuildResponse.md b/docs/WebhookSourceGuildResponse.md new file mode 100644 index 0000000..6a6e788 --- /dev/null +++ b/docs/WebhookSourceGuildResponse.md @@ -0,0 +1,31 @@ +# WebhookSourceGuildResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**icon** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookSourceGuildResponse from a JSON string +webhook_source_guild_response_instance = WebhookSourceGuildResponse.from_json(json) +# print the JSON string representation of the object +print(WebhookSourceGuildResponse.to_json()) + +# convert the object into a dict +webhook_source_guild_response_dict = webhook_source_guild_response_instance.to_dict() +# create an instance of WebhookSourceGuildResponse from a dict +webhook_source_guild_response_from_dict = WebhookSourceGuildResponse.from_dict(webhook_source_guild_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WelcomeMessageResponse.md b/docs/WelcomeMessageResponse.md new file mode 100644 index 0000000..05c4f15 --- /dev/null +++ b/docs/WelcomeMessageResponse.md @@ -0,0 +1,30 @@ +# WelcomeMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author_ids** | **List[str]** | | +**message** | **str** | | + +## Example + +```python +from dc_rest.models.welcome_message_response import WelcomeMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WelcomeMessageResponse from a JSON string +welcome_message_response_instance = WelcomeMessageResponse.from_json(json) +# print the JSON string representation of the object +print(WelcomeMessageResponse.to_json()) + +# convert the object into a dict +welcome_message_response_dict = welcome_message_response_instance.to_dict() +# create an instance of WelcomeMessageResponse from a dict +welcome_message_response_from_dict = WelcomeMessageResponse.from_dict(welcome_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WelcomeScreenPatchRequestPartial.md b/docs/WelcomeScreenPatchRequestPartial.md new file mode 100644 index 0000000..4ee406f --- /dev/null +++ b/docs/WelcomeScreenPatchRequestPartial.md @@ -0,0 +1,31 @@ +# WelcomeScreenPatchRequestPartial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**welcome_channels** | [**List[GuildWelcomeChannel]**](GuildWelcomeChannel.md) | | [optional] +**enabled** | **bool** | | [optional] + +## Example + +```python +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial + +# TODO update the JSON string below +json = "{}" +# create an instance of WelcomeScreenPatchRequestPartial from a JSON string +welcome_screen_patch_request_partial_instance = WelcomeScreenPatchRequestPartial.from_json(json) +# print the JSON string representation of the object +print(WelcomeScreenPatchRequestPartial.to_json()) + +# convert the object into a dict +welcome_screen_patch_request_partial_dict = welcome_screen_patch_request_partial_instance.to_dict() +# create an instance of WelcomeScreenPatchRequestPartial from a dict +welcome_screen_patch_request_partial_from_dict = WelcomeScreenPatchRequestPartial.from_dict(welcome_screen_patch_request_partial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WidgetActivity.md b/docs/WidgetActivity.md new file mode 100644 index 0000000..8dab595 --- /dev/null +++ b/docs/WidgetActivity.md @@ -0,0 +1,29 @@ +# WidgetActivity + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from dc_rest.models.widget_activity import WidgetActivity + +# TODO update the JSON string below +json = "{}" +# create an instance of WidgetActivity from a JSON string +widget_activity_instance = WidgetActivity.from_json(json) +# print the JSON string representation of the object +print(WidgetActivity.to_json()) + +# convert the object into a dict +widget_activity_dict = widget_activity_instance.to_dict() +# create an instance of WidgetActivity from a dict +widget_activity_from_dict = WidgetActivity.from_dict(widget_activity_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WidgetChannel.md b/docs/WidgetChannel.md new file mode 100644 index 0000000..c43ef43 --- /dev/null +++ b/docs/WidgetChannel.md @@ -0,0 +1,31 @@ +# WidgetChannel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**position** | **int** | | + +## Example + +```python +from dc_rest.models.widget_channel import WidgetChannel + +# TODO update the JSON string below +json = "{}" +# create an instance of WidgetChannel from a JSON string +widget_channel_instance = WidgetChannel.from_json(json) +# print the JSON string representation of the object +print(WidgetChannel.to_json()) + +# convert the object into a dict +widget_channel_dict = widget_channel_instance.to_dict() +# create an instance of WidgetChannel from a dict +widget_channel_from_dict = WidgetChannel.from_dict(widget_channel_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WidgetMember.md b/docs/WidgetMember.md new file mode 100644 index 0000000..6604dc6 --- /dev/null +++ b/docs/WidgetMember.md @@ -0,0 +1,41 @@ +# WidgetMember + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**username** | **str** | | +**discriminator** | **str** | | +**avatar** | **object** | | [optional] +**status** | **str** | | +**avatar_url** | **str** | | +**activity** | [**WidgetActivity**](WidgetActivity.md) | | [optional] +**deaf** | **bool** | | [optional] +**mute** | **bool** | | [optional] +**self_deaf** | **bool** | | [optional] +**self_mute** | **bool** | | [optional] +**suppress** | **bool** | | [optional] +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.widget_member import WidgetMember + +# TODO update the JSON string below +json = "{}" +# create an instance of WidgetMember from a JSON string +widget_member_instance = WidgetMember.from_json(json) +# print the JSON string representation of the object +print(WidgetMember.to_json()) + +# convert the object into a dict +widget_member_dict = widget_member_instance.to_dict() +# create an instance of WidgetMember from a dict +widget_member_from_dict = WidgetMember.from_dict(widget_member_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WidgetResponse.md b/docs/WidgetResponse.md new file mode 100644 index 0000000..5eb1044 --- /dev/null +++ b/docs/WidgetResponse.md @@ -0,0 +1,34 @@ +# WidgetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**instant_invite** | **str** | | [optional] +**channels** | [**List[WidgetChannel]**](WidgetChannel.md) | | +**members** | [**List[WidgetMember]**](WidgetMember.md) | | +**presence_count** | **int** | | + +## Example + +```python +from dc_rest.models.widget_response import WidgetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WidgetResponse from a JSON string +widget_response_instance = WidgetResponse.from_json(json) +# print the JSON string representation of the object +print(WidgetResponse.to_json()) + +# convert the object into a dict +widget_response_dict = widget_response_instance.to_dict() +# create an instance of WidgetResponse from a dict +widget_response_from_dict = WidgetResponse.from_dict(widget_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WidgetSettingsResponse.md b/docs/WidgetSettingsResponse.md new file mode 100644 index 0000000..eec731f --- /dev/null +++ b/docs/WidgetSettingsResponse.md @@ -0,0 +1,30 @@ +# WidgetSettingsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | | +**channel_id** | **str** | | [optional] + +## Example + +```python +from dc_rest.models.widget_settings_response import WidgetSettingsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WidgetSettingsResponse from a JSON string +widget_settings_response_instance = WidgetSettingsResponse.from_json(json) +# print the JSON string representation of the object +print(WidgetSettingsResponse.to_json()) + +# convert the object into a dict +widget_settings_response_dict = widget_settings_response_instance.to_dict() +# create an instance of WidgetSettingsResponse from a dict +widget_settings_response_from_dict = WidgetSettingsResponse.from_dict(widget_settings_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9b4540a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,97 @@ +[project] +name = "dc_rest" +version = "10" +description = "Discord HTTP API (Preview)" +authors = [ + {name = "ΣX",email = "gitctrlx@gmail.com"}, +] +license = "MIT" +readme = "README.md" +keywords = ["Discord HTTP API (Preview)"] +requires-python = ">=3.9" + +dependencies = [ + "urllib3 (>=2.1.0,<3.0.0)", + "python-dateutil (>=2.8.2)", + "aiohttp (>=3.8.4)", + "aiohttp-retry (>=2.8.3)", + "pydantic (>=2)", + "typing-extensions (>=4.7.1)" +] + +[project.urls] +Repository = "https://github.com/dc-api/dc-rest-python" + +[tool.poetry] +requires-poetry = ">=2.0" + +[tool.poetry.group.dev.dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "dc_rest", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "dc_rest.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..90de8aa --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +urllib3 >= 2.1.0, < 3.0.0 +python_dateutil >= 2.8.2 +aiohttp >= 3.8.4 +aiohttp-retry >= 2.8.3 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6fbb289 --- /dev/null +++ b/setup.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "dc-rest" +VERSION = "10" +PYTHON_REQUIRES = ">= 3.9" +REQUIRES = [ + "urllib3 >= 2.1.0, < 3.0.0", + "python-dateutil >= 2.8.2", + "aiohttp >= 3.8.4", + "aiohttp-retry >= 2.8.3", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Discord HTTP API (Preview)", + author="ΣX", + author_email="gitctrlx@gmail.com", + url="https://github.com/dc-api/dc-rest-python", + keywords=["Discord HTTP API (Preview)"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="MIT", + long_description_content_type='text/markdown', + long_description="""\ + Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + """, # noqa: E501 + package_data={"dc_rest": ["py.typed"]}, +) \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..e98555c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_account_response.py b/test/test_account_response.py new file mode 100644 index 0000000..5732678 --- /dev/null +++ b/test/test_account_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.account_response import AccountResponse + +class TestAccountResponse(unittest.TestCase): + """AccountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountResponse: + """Test AccountResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountResponse` + """ + model = AccountResponse() + if include_optional: + return AccountResponse( + id = '', + name = '' + ) + else: + return AccountResponse( + id = '', + ) + """ + + def testAccountResponse(self): + """Test AccountResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_row_component_for_message_request.py b/test/test_action_row_component_for_message_request.py new file mode 100644 index 0000000..2427013 --- /dev/null +++ b/test/test_action_row_component_for_message_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.action_row_component_for_message_request import ActionRowComponentForMessageRequest + +class TestActionRowComponentForMessageRequest(unittest.TestCase): + """ActionRowComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionRowComponentForMessageRequest: + """Test ActionRowComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionRowComponentForMessageRequest` + """ + model = ActionRowComponentForMessageRequest() + if include_optional: + return ActionRowComponentForMessageRequest( + type = 56, + components = [ + null + ] + ) + else: + return ActionRowComponentForMessageRequest( + type = 56, + components = [ + null + ], + ) + """ + + def testActionRowComponentForMessageRequest(self): + """Test ActionRowComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_row_component_for_message_request_components_inner.py b/test/test_action_row_component_for_message_request_components_inner.py new file mode 100644 index 0000000..ed8ebe6 --- /dev/null +++ b/test/test_action_row_component_for_message_request_components_inner.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.action_row_component_for_message_request_components_inner import ActionRowComponentForMessageRequestComponentsInner + +class TestActionRowComponentForMessageRequestComponentsInner(unittest.TestCase): + """ActionRowComponentForMessageRequestComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionRowComponentForMessageRequestComponentsInner: + """Test ActionRowComponentForMessageRequestComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionRowComponentForMessageRequestComponentsInner` + """ + model = ActionRowComponentForMessageRequestComponentsInner() + if include_optional: + return ActionRowComponentForMessageRequestComponentsInner( + type = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), + placeholder = '', + min_values = 0, + max_values = 1, + default_values = [ + dc_rest.models.user_select_default_value.UserSelectDefaultValue( + type = 'user', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + channel_types = [ + 56 + ], + options = [ + dc_rest.models.string_select_option_for_message_request.StringSelectOptionForMessageRequest( + label = '0', + value = '0', + description = '', + default = True, + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), ) + ] + ) + else: + return ActionRowComponentForMessageRequestComponentsInner( + type = 56, + custom_id = '', + style = 56, + options = [ + dc_rest.models.string_select_option_for_message_request.StringSelectOptionForMessageRequest( + label = '0', + value = '0', + description = '', + default = True, + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), ) + ], + ) + """ + + def testActionRowComponentForMessageRequestComponentsInner(self): + """Test ActionRowComponentForMessageRequestComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_row_component_for_modal_request.py b/test/test_action_row_component_for_modal_request.py new file mode 100644 index 0000000..f3c2be1 --- /dev/null +++ b/test/test_action_row_component_for_modal_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.action_row_component_for_modal_request import ActionRowComponentForModalRequest + +class TestActionRowComponentForModalRequest(unittest.TestCase): + """ActionRowComponentForModalRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionRowComponentForModalRequest: + """Test ActionRowComponentForModalRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionRowComponentForModalRequest` + """ + model = ActionRowComponentForModalRequest() + if include_optional: + return ActionRowComponentForModalRequest( + type = 56, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ] + ) + else: + return ActionRowComponentForModalRequest( + type = 56, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ], + ) + """ + + def testActionRowComponentForModalRequest(self): + """Test ActionRowComponentForModalRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_row_component_response.py b/test/test_action_row_component_response.py new file mode 100644 index 0000000..64c2007 --- /dev/null +++ b/test/test_action_row_component_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.action_row_component_response import ActionRowComponentResponse + +class TestActionRowComponentResponse(unittest.TestCase): + """ActionRowComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionRowComponentResponse: + """Test ActionRowComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionRowComponentResponse` + """ + model = ActionRowComponentResponse() + if include_optional: + return ActionRowComponentResponse( + type = 56, + id = 56, + components = [ + null + ] + ) + else: + return ActionRowComponentResponse( + type = 56, + id = 56, + ) + """ + + def testActionRowComponentResponse(self): + """Test ActionRowComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_row_component_response_components_inner.py b/test/test_action_row_component_response_components_inner.py new file mode 100644 index 0000000..7662dc6 --- /dev/null +++ b/test/test_action_row_component_response_components_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.action_row_component_response_components_inner import ActionRowComponentResponseComponentsInner + +class TestActionRowComponentResponseComponentsInner(unittest.TestCase): + """ActionRowComponentResponseComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionRowComponentResponseComponentsInner: + """Test ActionRowComponentResponseComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionRowComponentResponseComponentsInner` + """ + model = ActionRowComponentResponseComponentsInner() + if include_optional: + return ActionRowComponentResponseComponentsInner( + type = 56, + id = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + placeholder = '', + min_values = 56, + max_values = 56, + channel_types = [ + 56 + ], + default_values = [ + dc_rest.models.user_select_default_value.UserSelectDefaultValue( + type = 'user', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + options = [ + dc_rest.models.string_select_option_response.StringSelectOptionResponse( + label = '', + value = '', + description = '', + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + default = True, ) + ], + value = '', + required = True, + min_length = 56, + max_length = 56 + ) + else: + return ActionRowComponentResponseComponentsInner( + type = 56, + id = 56, + custom_id = '', + style = 56, + options = [ + dc_rest.models.string_select_option_response.StringSelectOptionResponse( + label = '', + value = '', + description = '', + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + default = True, ) + ], + ) + """ + + def testActionRowComponentResponseComponentsInner(self): + """Test ActionRowComponentResponseComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activities_attachment_response.py b/test/test_activities_attachment_response.py new file mode 100644 index 0000000..47e29ae --- /dev/null +++ b/test/test_activities_attachment_response.py @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.activities_attachment_response import ActivitiesAttachmentResponse + +class TestActivitiesAttachmentResponse(unittest.TestCase): + """ActivitiesAttachmentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivitiesAttachmentResponse: + """Test ActivitiesAttachmentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivitiesAttachmentResponse` + """ + model = ActivitiesAttachmentResponse() + if include_optional: + return ActivitiesAttachmentResponse( + attachment = dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = , + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = , + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ) + else: + return ActivitiesAttachmentResponse( + attachment = dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = , + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = , + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ), + ) + """ + + def testActivitiesAttachmentResponse(self): + """Test ActivitiesAttachmentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_group_dm_user201_response.py b/test/test_add_group_dm_user201_response.py new file mode 100644 index 0000000..bfb7ee6 --- /dev/null +++ b/test/test_add_group_dm_user201_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.add_group_dm_user201_response import AddGroupDmUser201Response + +class TestAddGroupDmUser201Response(unittest.TestCase): + """AddGroupDmUser201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddGroupDmUser201Response: + """Test AddGroupDmUser201Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddGroupDmUser201Response` + """ + model = AddGroupDmUser201Response() + if include_optional: + return AddGroupDmUser201Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + name = '', + icon = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + managed = True, + application_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return AddGroupDmUser201Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + ) + """ + + def testAddGroupDmUser201Response(self): + """Test AddGroupDmUser201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_group_dm_user_request.py b/test/test_add_group_dm_user_request.py new file mode 100644 index 0000000..fcdb740 --- /dev/null +++ b/test/test_add_group_dm_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.add_group_dm_user_request import AddGroupDmUserRequest + +class TestAddGroupDmUserRequest(unittest.TestCase): + """AddGroupDmUserRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddGroupDmUserRequest: + """Test AddGroupDmUserRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddGroupDmUserRequest` + """ + model = AddGroupDmUserRequest() + if include_optional: + return AddGroupDmUserRequest( + access_token = '', + nick = '' + ) + else: + return AddGroupDmUserRequest( + ) + """ + + def testAddGroupDmUserRequest(self): + """Test AddGroupDmUserRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_guild_member_request.py b/test/test_add_guild_member_request.py new file mode 100644 index 0000000..20a7eeb --- /dev/null +++ b/test/test_add_guild_member_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.add_guild_member_request import AddGuildMemberRequest + +class TestAddGuildMemberRequest(unittest.TestCase): + """AddGuildMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddGuildMemberRequest: + """Test AddGuildMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddGuildMemberRequest` + """ + model = AddGuildMemberRequest() + if include_optional: + return AddGuildMemberRequest( + nick = '', + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + mute = True, + deaf = True, + access_token = '', + flags = 56 + ) + else: + return AddGuildMemberRequest( + access_token = '', + ) + """ + + def testAddGuildMemberRequest(self): + """Test AddGuildMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_lobby_member_request.py b/test/test_add_lobby_member_request.py new file mode 100644 index 0000000..d04afc7 --- /dev/null +++ b/test/test_add_lobby_member_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.add_lobby_member_request import AddLobbyMemberRequest + +class TestAddLobbyMemberRequest(unittest.TestCase): + """AddLobbyMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddLobbyMemberRequest: + """Test AddLobbyMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddLobbyMemberRequest` + """ + model = AddLobbyMemberRequest() + if include_optional: + return AddLobbyMemberRequest( + metadata = { + 'key' : '' + }, + flags = 1 + ) + else: + return AddLobbyMemberRequest( + ) + """ + + def testAddLobbyMemberRequest(self): + """Test AddLobbyMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_attachment_option.py b/test/test_application_command_attachment_option.py new file mode 100644 index 0000000..784b634 --- /dev/null +++ b/test/test_application_command_attachment_option.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_attachment_option import ApplicationCommandAttachmentOption + +class TestApplicationCommandAttachmentOption(unittest.TestCase): + """ApplicationCommandAttachmentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandAttachmentOption: + """Test ApplicationCommandAttachmentOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandAttachmentOption` + """ + model = ApplicationCommandAttachmentOption() + if include_optional: + return ApplicationCommandAttachmentOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True + ) + else: + return ApplicationCommandAttachmentOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandAttachmentOption(self): + """Test ApplicationCommandAttachmentOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_attachment_option_response.py b/test/test_application_command_attachment_option_response.py new file mode 100644 index 0000000..3a71081 --- /dev/null +++ b/test/test_application_command_attachment_option_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_attachment_option_response import ApplicationCommandAttachmentOptionResponse + +class TestApplicationCommandAttachmentOptionResponse(unittest.TestCase): + """ApplicationCommandAttachmentOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandAttachmentOptionResponse: + """Test ApplicationCommandAttachmentOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandAttachmentOptionResponse` + """ + model = ApplicationCommandAttachmentOptionResponse() + if include_optional: + return ApplicationCommandAttachmentOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True + ) + else: + return ApplicationCommandAttachmentOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandAttachmentOptionResponse(self): + """Test ApplicationCommandAttachmentOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_autocomplete_callback_request.py b/test/test_application_command_autocomplete_callback_request.py new file mode 100644 index 0000000..bb469c1 --- /dev/null +++ b/test/test_application_command_autocomplete_callback_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_autocomplete_callback_request import ApplicationCommandAutocompleteCallbackRequest + +class TestApplicationCommandAutocompleteCallbackRequest(unittest.TestCase): + """ApplicationCommandAutocompleteCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandAutocompleteCallbackRequest: + """Test ApplicationCommandAutocompleteCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandAutocompleteCallbackRequest` + """ + model = ApplicationCommandAutocompleteCallbackRequest() + if include_optional: + return ApplicationCommandAutocompleteCallbackRequest( + type = 56, + data = None + ) + else: + return ApplicationCommandAutocompleteCallbackRequest( + type = 56, + data = None, + ) + """ + + def testApplicationCommandAutocompleteCallbackRequest(self): + """Test ApplicationCommandAutocompleteCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_autocomplete_callback_request_data.py b/test/test_application_command_autocomplete_callback_request_data.py new file mode 100644 index 0000000..a75e94b --- /dev/null +++ b/test/test_application_command_autocomplete_callback_request_data.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_autocomplete_callback_request_data import ApplicationCommandAutocompleteCallbackRequestData + +class TestApplicationCommandAutocompleteCallbackRequestData(unittest.TestCase): + """ApplicationCommandAutocompleteCallbackRequestData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandAutocompleteCallbackRequestData: + """Test ApplicationCommandAutocompleteCallbackRequestData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandAutocompleteCallbackRequestData` + """ + model = ApplicationCommandAutocompleteCallbackRequestData() + if include_optional: + return ApplicationCommandAutocompleteCallbackRequestData( + choices = [ + dc_rest.models.application_command_option_string_choice.ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '', ) + ] + ) + else: + return ApplicationCommandAutocompleteCallbackRequestData( + ) + """ + + def testApplicationCommandAutocompleteCallbackRequestData(self): + """Test ApplicationCommandAutocompleteCallbackRequestData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_boolean_option.py b/test/test_application_command_boolean_option.py new file mode 100644 index 0000000..592437c --- /dev/null +++ b/test/test_application_command_boolean_option.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_boolean_option import ApplicationCommandBooleanOption + +class TestApplicationCommandBooleanOption(unittest.TestCase): + """ApplicationCommandBooleanOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandBooleanOption: + """Test ApplicationCommandBooleanOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandBooleanOption` + """ + model = ApplicationCommandBooleanOption() + if include_optional: + return ApplicationCommandBooleanOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True + ) + else: + return ApplicationCommandBooleanOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandBooleanOption(self): + """Test ApplicationCommandBooleanOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_boolean_option_response.py b/test/test_application_command_boolean_option_response.py new file mode 100644 index 0000000..9b4d90f --- /dev/null +++ b/test/test_application_command_boolean_option_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_boolean_option_response import ApplicationCommandBooleanOptionResponse + +class TestApplicationCommandBooleanOptionResponse(unittest.TestCase): + """ApplicationCommandBooleanOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandBooleanOptionResponse: + """Test ApplicationCommandBooleanOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandBooleanOptionResponse` + """ + model = ApplicationCommandBooleanOptionResponse() + if include_optional: + return ApplicationCommandBooleanOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True + ) + else: + return ApplicationCommandBooleanOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandBooleanOptionResponse(self): + """Test ApplicationCommandBooleanOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_channel_option.py b/test/test_application_command_channel_option.py new file mode 100644 index 0000000..3c62bcb --- /dev/null +++ b/test/test_application_command_channel_option.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_channel_option import ApplicationCommandChannelOption + +class TestApplicationCommandChannelOption(unittest.TestCase): + """ApplicationCommandChannelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandChannelOption: + """Test ApplicationCommandChannelOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandChannelOption` + """ + model = ApplicationCommandChannelOption() + if include_optional: + return ApplicationCommandChannelOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + channel_types = [ + 56 + ] + ) + else: + return ApplicationCommandChannelOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandChannelOption(self): + """Test ApplicationCommandChannelOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_channel_option_response.py b/test/test_application_command_channel_option_response.py new file mode 100644 index 0000000..552e4c6 --- /dev/null +++ b/test/test_application_command_channel_option_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_channel_option_response import ApplicationCommandChannelOptionResponse + +class TestApplicationCommandChannelOptionResponse(unittest.TestCase): + """ApplicationCommandChannelOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandChannelOptionResponse: + """Test ApplicationCommandChannelOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandChannelOptionResponse` + """ + model = ApplicationCommandChannelOptionResponse() + if include_optional: + return ApplicationCommandChannelOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + channel_types = [ + 56 + ] + ) + else: + return ApplicationCommandChannelOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandChannelOptionResponse(self): + """Test ApplicationCommandChannelOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_create_request.py b/test/test_application_command_create_request.py new file mode 100644 index 0000000..ba11923 --- /dev/null +++ b/test/test_application_command_create_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_create_request import ApplicationCommandCreateRequest + +class TestApplicationCommandCreateRequest(unittest.TestCase): + """ApplicationCommandCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandCreateRequest: + """Test ApplicationCommandCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandCreateRequest` + """ + model = ApplicationCommandCreateRequest() + if include_optional: + return ApplicationCommandCreateRequest( + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '', + description_localizations = { + 'key' : '0' + }, + options = [ + null + ], + default_member_permissions = 0, + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + handler = 56, + type = 56 + ) + else: + return ApplicationCommandCreateRequest( + name = '0', + ) + """ + + def testApplicationCommandCreateRequest(self): + """Test ApplicationCommandCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_create_request_options_inner.py b/test/test_application_command_create_request_options_inner.py new file mode 100644 index 0000000..2d76cec --- /dev/null +++ b/test/test_application_command_create_request_options_inner.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_create_request_options_inner import ApplicationCommandCreateRequestOptionsInner + +class TestApplicationCommandCreateRequestOptionsInner(unittest.TestCase): + """ApplicationCommandCreateRequestOptionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandCreateRequestOptionsInner: + """Test ApplicationCommandCreateRequestOptionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandCreateRequestOptionsInner` + """ + model = ApplicationCommandCreateRequestOptionsInner() + if include_optional: + return ApplicationCommandCreateRequestOptionsInner( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + channel_types = [ + 56 + ], + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_string_choice.ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '', ) + ], + min_value = 1.337, + max_value = 1.337, + min_length = 0, + max_length = 1, + options = [ + null + ] + ) + else: + return ApplicationCommandCreateRequestOptionsInner( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandCreateRequestOptionsInner(self): + """Test ApplicationCommandCreateRequestOptionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_integer_option.py b/test/test_application_command_integer_option.py new file mode 100644 index 0000000..4780e9d --- /dev/null +++ b/test/test_application_command_integer_option.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_integer_option import ApplicationCommandIntegerOption + +class TestApplicationCommandIntegerOption(unittest.TestCase): + """ApplicationCommandIntegerOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandIntegerOption: + """Test ApplicationCommandIntegerOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandIntegerOption` + """ + model = ApplicationCommandIntegerOption() + if include_optional: + return ApplicationCommandIntegerOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_integer_choice.ApplicationCommandOptionIntegerChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = -9007199254740991, ) + ], + min_value = -9007199254740991, + max_value = -9007199254740991 + ) + else: + return ApplicationCommandIntegerOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandIntegerOption(self): + """Test ApplicationCommandIntegerOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_integer_option_response.py b/test/test_application_command_integer_option_response.py new file mode 100644 index 0000000..ae7c551 --- /dev/null +++ b/test/test_application_command_integer_option_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_integer_option_response import ApplicationCommandIntegerOptionResponse + +class TestApplicationCommandIntegerOptionResponse(unittest.TestCase): + """ApplicationCommandIntegerOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandIntegerOptionResponse: + """Test ApplicationCommandIntegerOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandIntegerOptionResponse` + """ + model = ApplicationCommandIntegerOptionResponse() + if include_optional: + return ApplicationCommandIntegerOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_integer_choice_response.ApplicationCommandOptionIntegerChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = -9007199254740991, ) + ], + min_value = -9007199254740991, + max_value = -9007199254740991 + ) + else: + return ApplicationCommandIntegerOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandIntegerOptionResponse(self): + """Test ApplicationCommandIntegerOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_interaction_metadata_response.py b/test/test_application_command_interaction_metadata_response.py new file mode 100644 index 0000000..eef8a56 --- /dev/null +++ b/test/test_application_command_interaction_metadata_response.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_interaction_metadata_response import ApplicationCommandInteractionMetadataResponse + +class TestApplicationCommandInteractionMetadataResponse(unittest.TestCase): + """ApplicationCommandInteractionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandInteractionMetadataResponse: + """Test ApplicationCommandInteractionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandInteractionMetadataResponse` + """ + model = ApplicationCommandInteractionMetadataResponse() + if include_optional: + return ApplicationCommandInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + original_response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + target_message_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ApplicationCommandInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + ) + """ + + def testApplicationCommandInteractionMetadataResponse(self): + """Test ApplicationCommandInteractionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_mentionable_option.py b/test/test_application_command_mentionable_option.py new file mode 100644 index 0000000..47e7df3 --- /dev/null +++ b/test/test_application_command_mentionable_option.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_mentionable_option import ApplicationCommandMentionableOption + +class TestApplicationCommandMentionableOption(unittest.TestCase): + """ApplicationCommandMentionableOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandMentionableOption: + """Test ApplicationCommandMentionableOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandMentionableOption` + """ + model = ApplicationCommandMentionableOption() + if include_optional: + return ApplicationCommandMentionableOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True + ) + else: + return ApplicationCommandMentionableOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandMentionableOption(self): + """Test ApplicationCommandMentionableOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_mentionable_option_response.py b/test/test_application_command_mentionable_option_response.py new file mode 100644 index 0000000..9223f0f --- /dev/null +++ b/test/test_application_command_mentionable_option_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_mentionable_option_response import ApplicationCommandMentionableOptionResponse + +class TestApplicationCommandMentionableOptionResponse(unittest.TestCase): + """ApplicationCommandMentionableOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandMentionableOptionResponse: + """Test ApplicationCommandMentionableOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandMentionableOptionResponse` + """ + model = ApplicationCommandMentionableOptionResponse() + if include_optional: + return ApplicationCommandMentionableOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True + ) + else: + return ApplicationCommandMentionableOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandMentionableOptionResponse(self): + """Test ApplicationCommandMentionableOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_number_option.py b/test/test_application_command_number_option.py new file mode 100644 index 0000000..143e6fd --- /dev/null +++ b/test/test_application_command_number_option.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_number_option import ApplicationCommandNumberOption + +class TestApplicationCommandNumberOption(unittest.TestCase): + """ApplicationCommandNumberOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandNumberOption: + """Test ApplicationCommandNumberOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandNumberOption` + """ + model = ApplicationCommandNumberOption() + if include_optional: + return ApplicationCommandNumberOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_number_choice.ApplicationCommandOptionNumberChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = 1.337, ) + ], + min_value = 1.337, + max_value = 1.337 + ) + else: + return ApplicationCommandNumberOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandNumberOption(self): + """Test ApplicationCommandNumberOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_number_option_response.py b/test/test_application_command_number_option_response.py new file mode 100644 index 0000000..b1332ad --- /dev/null +++ b/test/test_application_command_number_option_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_number_option_response import ApplicationCommandNumberOptionResponse + +class TestApplicationCommandNumberOptionResponse(unittest.TestCase): + """ApplicationCommandNumberOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandNumberOptionResponse: + """Test ApplicationCommandNumberOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandNumberOptionResponse` + """ + model = ApplicationCommandNumberOptionResponse() + if include_optional: + return ApplicationCommandNumberOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_number_choice_response.ApplicationCommandOptionNumberChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = 1.337, ) + ], + min_value = 1.337, + max_value = 1.337 + ) + else: + return ApplicationCommandNumberOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandNumberOptionResponse(self): + """Test ApplicationCommandNumberOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_integer_choice.py b/test/test_application_command_option_integer_choice.py new file mode 100644 index 0000000..b99278b --- /dev/null +++ b/test/test_application_command_option_integer_choice.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_integer_choice import ApplicationCommandOptionIntegerChoice + +class TestApplicationCommandOptionIntegerChoice(unittest.TestCase): + """ApplicationCommandOptionIntegerChoice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionIntegerChoice: + """Test ApplicationCommandOptionIntegerChoice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionIntegerChoice` + """ + model = ApplicationCommandOptionIntegerChoice() + if include_optional: + return ApplicationCommandOptionIntegerChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = -9007199254740991 + ) + else: + return ApplicationCommandOptionIntegerChoice( + name = '0', + value = -9007199254740991, + ) + """ + + def testApplicationCommandOptionIntegerChoice(self): + """Test ApplicationCommandOptionIntegerChoice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_integer_choice_response.py b/test/test_application_command_option_integer_choice_response.py new file mode 100644 index 0000000..40d3824 --- /dev/null +++ b/test/test_application_command_option_integer_choice_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_integer_choice_response import ApplicationCommandOptionIntegerChoiceResponse + +class TestApplicationCommandOptionIntegerChoiceResponse(unittest.TestCase): + """ApplicationCommandOptionIntegerChoiceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionIntegerChoiceResponse: + """Test ApplicationCommandOptionIntegerChoiceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionIntegerChoiceResponse` + """ + model = ApplicationCommandOptionIntegerChoiceResponse() + if include_optional: + return ApplicationCommandOptionIntegerChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = -9007199254740991 + ) + else: + return ApplicationCommandOptionIntegerChoiceResponse( + name = '', + value = -9007199254740991, + ) + """ + + def testApplicationCommandOptionIntegerChoiceResponse(self): + """Test ApplicationCommandOptionIntegerChoiceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_number_choice.py b/test/test_application_command_option_number_choice.py new file mode 100644 index 0000000..41984fb --- /dev/null +++ b/test/test_application_command_option_number_choice.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_number_choice import ApplicationCommandOptionNumberChoice + +class TestApplicationCommandOptionNumberChoice(unittest.TestCase): + """ApplicationCommandOptionNumberChoice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionNumberChoice: + """Test ApplicationCommandOptionNumberChoice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionNumberChoice` + """ + model = ApplicationCommandOptionNumberChoice() + if include_optional: + return ApplicationCommandOptionNumberChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = 1.337 + ) + else: + return ApplicationCommandOptionNumberChoice( + name = '0', + value = 1.337, + ) + """ + + def testApplicationCommandOptionNumberChoice(self): + """Test ApplicationCommandOptionNumberChoice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_number_choice_response.py b/test/test_application_command_option_number_choice_response.py new file mode 100644 index 0000000..109e3b3 --- /dev/null +++ b/test/test_application_command_option_number_choice_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_number_choice_response import ApplicationCommandOptionNumberChoiceResponse + +class TestApplicationCommandOptionNumberChoiceResponse(unittest.TestCase): + """ApplicationCommandOptionNumberChoiceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionNumberChoiceResponse: + """Test ApplicationCommandOptionNumberChoiceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionNumberChoiceResponse` + """ + model = ApplicationCommandOptionNumberChoiceResponse() + if include_optional: + return ApplicationCommandOptionNumberChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = 1.337 + ) + else: + return ApplicationCommandOptionNumberChoiceResponse( + name = '', + value = 1.337, + ) + """ + + def testApplicationCommandOptionNumberChoiceResponse(self): + """Test ApplicationCommandOptionNumberChoiceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_string_choice.py b/test/test_application_command_option_string_choice.py new file mode 100644 index 0000000..759632a --- /dev/null +++ b/test/test_application_command_option_string_choice.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_string_choice import ApplicationCommandOptionStringChoice + +class TestApplicationCommandOptionStringChoice(unittest.TestCase): + """ApplicationCommandOptionStringChoice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionStringChoice: + """Test ApplicationCommandOptionStringChoice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionStringChoice` + """ + model = ApplicationCommandOptionStringChoice() + if include_optional: + return ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '' + ) + else: + return ApplicationCommandOptionStringChoice( + name = '0', + value = '', + ) + """ + + def testApplicationCommandOptionStringChoice(self): + """Test ApplicationCommandOptionStringChoice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_option_string_choice_response.py b/test/test_application_command_option_string_choice_response.py new file mode 100644 index 0000000..8fbb4a2 --- /dev/null +++ b/test/test_application_command_option_string_choice_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_option_string_choice_response import ApplicationCommandOptionStringChoiceResponse + +class TestApplicationCommandOptionStringChoiceResponse(unittest.TestCase): + """ApplicationCommandOptionStringChoiceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandOptionStringChoiceResponse: + """Test ApplicationCommandOptionStringChoiceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandOptionStringChoiceResponse` + """ + model = ApplicationCommandOptionStringChoiceResponse() + if include_optional: + return ApplicationCommandOptionStringChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = '' + ) + else: + return ApplicationCommandOptionStringChoiceResponse( + name = '', + value = '', + ) + """ + + def testApplicationCommandOptionStringChoiceResponse(self): + """Test ApplicationCommandOptionStringChoiceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_patch_request_partial.py b/test/test_application_command_patch_request_partial.py new file mode 100644 index 0000000..86f50cc --- /dev/null +++ b/test/test_application_command_patch_request_partial.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_patch_request_partial import ApplicationCommandPatchRequestPartial + +class TestApplicationCommandPatchRequestPartial(unittest.TestCase): + """ApplicationCommandPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandPatchRequestPartial: + """Test ApplicationCommandPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandPatchRequestPartial` + """ + model = ApplicationCommandPatchRequestPartial() + if include_optional: + return ApplicationCommandPatchRequestPartial( + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '', + description_localizations = { + 'key' : '0' + }, + options = [ + null + ], + default_member_permissions = 0, + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + handler = 56 + ) + else: + return ApplicationCommandPatchRequestPartial( + ) + """ + + def testApplicationCommandPatchRequestPartial(self): + """Test ApplicationCommandPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_permission.py b/test/test_application_command_permission.py new file mode 100644 index 0000000..862c2a5 --- /dev/null +++ b/test/test_application_command_permission.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_permission import ApplicationCommandPermission + +class TestApplicationCommandPermission(unittest.TestCase): + """ApplicationCommandPermission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandPermission: + """Test ApplicationCommandPermission + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandPermission` + """ + model = ApplicationCommandPermission() + if include_optional: + return ApplicationCommandPermission( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True + ) + else: + return ApplicationCommandPermission( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True, + ) + """ + + def testApplicationCommandPermission(self): + """Test ApplicationCommandPermission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_response.py b/test/test_application_command_response.py new file mode 100644 index 0000000..1c5c87f --- /dev/null +++ b/test/test_application_command_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_response import ApplicationCommandResponse + +class TestApplicationCommandResponse(unittest.TestCase): + """ApplicationCommandResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandResponse: + """Test ApplicationCommandResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandResponse` + """ + model = ApplicationCommandResponse() + if include_optional: + return ApplicationCommandResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + version = '9072888001528021798096225500850762068629339333975650685139102691291', + default_member_permissions = '', + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + options = [ + null + ], + nsfw = True + ) + else: + return ApplicationCommandResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + version = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandResponse(self): + """Test ApplicationCommandResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_response_options_inner.py b/test/test_application_command_response_options_inner.py new file mode 100644 index 0000000..2d5a7a4 --- /dev/null +++ b/test/test_application_command_response_options_inner.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_response_options_inner import ApplicationCommandResponseOptionsInner + +class TestApplicationCommandResponseOptionsInner(unittest.TestCase): + """ApplicationCommandResponseOptionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandResponseOptionsInner: + """Test ApplicationCommandResponseOptionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandResponseOptionsInner` + """ + model = ApplicationCommandResponseOptionsInner() + if include_optional: + return ApplicationCommandResponseOptionsInner( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + channel_types = [ + 56 + ], + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_string_choice_response.ApplicationCommandOptionStringChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = '', ) + ], + min_value = 1.337, + max_value = 1.337, + min_length = 56, + max_length = 56, + options = [ + null + ] + ) + else: + return ApplicationCommandResponseOptionsInner( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandResponseOptionsInner(self): + """Test ApplicationCommandResponseOptionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_role_option.py b/test/test_application_command_role_option.py new file mode 100644 index 0000000..2336001 --- /dev/null +++ b/test/test_application_command_role_option.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_role_option import ApplicationCommandRoleOption + +class TestApplicationCommandRoleOption(unittest.TestCase): + """ApplicationCommandRoleOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandRoleOption: + """Test ApplicationCommandRoleOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandRoleOption` + """ + model = ApplicationCommandRoleOption() + if include_optional: + return ApplicationCommandRoleOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True + ) + else: + return ApplicationCommandRoleOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandRoleOption(self): + """Test ApplicationCommandRoleOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_role_option_response.py b/test/test_application_command_role_option_response.py new file mode 100644 index 0000000..a3c5f25 --- /dev/null +++ b/test/test_application_command_role_option_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_role_option_response import ApplicationCommandRoleOptionResponse + +class TestApplicationCommandRoleOptionResponse(unittest.TestCase): + """ApplicationCommandRoleOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandRoleOptionResponse: + """Test ApplicationCommandRoleOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandRoleOptionResponse` + """ + model = ApplicationCommandRoleOptionResponse() + if include_optional: + return ApplicationCommandRoleOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True + ) + else: + return ApplicationCommandRoleOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandRoleOptionResponse(self): + """Test ApplicationCommandRoleOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_string_option.py b/test/test_application_command_string_option.py new file mode 100644 index 0000000..7d50f86 --- /dev/null +++ b/test/test_application_command_string_option.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_string_option import ApplicationCommandStringOption + +class TestApplicationCommandStringOption(unittest.TestCase): + """ApplicationCommandStringOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandStringOption: + """Test ApplicationCommandStringOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandStringOption` + """ + model = ApplicationCommandStringOption() + if include_optional: + return ApplicationCommandStringOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + autocomplete = True, + min_length = 0, + max_length = 1, + choices = [ + dc_rest.models.application_command_option_string_choice.ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '', ) + ] + ) + else: + return ApplicationCommandStringOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandStringOption(self): + """Test ApplicationCommandStringOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_string_option_response.py b/test/test_application_command_string_option_response.py new file mode 100644 index 0000000..26f14ea --- /dev/null +++ b/test/test_application_command_string_option_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_string_option_response import ApplicationCommandStringOptionResponse + +class TestApplicationCommandStringOptionResponse(unittest.TestCase): + """ApplicationCommandStringOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandStringOptionResponse: + """Test ApplicationCommandStringOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandStringOptionResponse` + """ + model = ApplicationCommandStringOptionResponse() + if include_optional: + return ApplicationCommandStringOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_string_choice_response.ApplicationCommandOptionStringChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = '', ) + ], + min_length = 56, + max_length = 56 + ) + else: + return ApplicationCommandStringOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandStringOptionResponse(self): + """Test ApplicationCommandStringOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_group_option.py b/test/test_application_command_subcommand_group_option.py new file mode 100644 index 0000000..bc86a6f --- /dev/null +++ b/test/test_application_command_subcommand_group_option.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_group_option import ApplicationCommandSubcommandGroupOption + +class TestApplicationCommandSubcommandGroupOption(unittest.TestCase): + """ApplicationCommandSubcommandGroupOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandGroupOption: + """Test ApplicationCommandSubcommandGroupOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandGroupOption` + """ + model = ApplicationCommandSubcommandGroupOption() + if include_optional: + return ApplicationCommandSubcommandGroupOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + options = [ + dc_rest.models.application_command_subcommand_option.ApplicationCommandSubcommandOption( + type = 1, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + options = [ + null + ], ) + ] + ) + else: + return ApplicationCommandSubcommandGroupOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandSubcommandGroupOption(self): + """Test ApplicationCommandSubcommandGroupOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_group_option_response.py b/test/test_application_command_subcommand_group_option_response.py new file mode 100644 index 0000000..89cc01f --- /dev/null +++ b/test/test_application_command_subcommand_group_option_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_group_option_response import ApplicationCommandSubcommandGroupOptionResponse + +class TestApplicationCommandSubcommandGroupOptionResponse(unittest.TestCase): + """ApplicationCommandSubcommandGroupOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandGroupOptionResponse: + """Test ApplicationCommandSubcommandGroupOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandGroupOptionResponse` + """ + model = ApplicationCommandSubcommandGroupOptionResponse() + if include_optional: + return ApplicationCommandSubcommandGroupOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + options = [ + dc_rest.models.application_command_subcommand_option_response.ApplicationCommandSubcommandOptionResponse( + type = 1, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + options = [ + null + ], ) + ] + ) + else: + return ApplicationCommandSubcommandGroupOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandSubcommandGroupOptionResponse(self): + """Test ApplicationCommandSubcommandGroupOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_option.py b/test/test_application_command_subcommand_option.py new file mode 100644 index 0000000..5d4dcb4 --- /dev/null +++ b/test/test_application_command_subcommand_option.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_option import ApplicationCommandSubcommandOption + +class TestApplicationCommandSubcommandOption(unittest.TestCase): + """ApplicationCommandSubcommandOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandOption: + """Test ApplicationCommandSubcommandOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandOption` + """ + model = ApplicationCommandSubcommandOption() + if include_optional: + return ApplicationCommandSubcommandOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + options = [ + null + ] + ) + else: + return ApplicationCommandSubcommandOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandSubcommandOption(self): + """Test ApplicationCommandSubcommandOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_option_options_inner.py b/test/test_application_command_subcommand_option_options_inner.py new file mode 100644 index 0000000..15b0ba4 --- /dev/null +++ b/test/test_application_command_subcommand_option_options_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_option_options_inner import ApplicationCommandSubcommandOptionOptionsInner + +class TestApplicationCommandSubcommandOptionOptionsInner(unittest.TestCase): + """ApplicationCommandSubcommandOptionOptionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandOptionOptionsInner: + """Test ApplicationCommandSubcommandOptionOptionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandOptionOptionsInner` + """ + model = ApplicationCommandSubcommandOptionOptionsInner() + if include_optional: + return ApplicationCommandSubcommandOptionOptionsInner( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True, + channel_types = [ + 56 + ], + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_string_choice.ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '', ) + ], + min_value = 1.337, + max_value = 1.337, + min_length = 0, + max_length = 1 + ) + else: + return ApplicationCommandSubcommandOptionOptionsInner( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandSubcommandOptionOptionsInner(self): + """Test ApplicationCommandSubcommandOptionOptionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_option_response.py b/test/test_application_command_subcommand_option_response.py new file mode 100644 index 0000000..aa1e0c0 --- /dev/null +++ b/test/test_application_command_subcommand_option_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_option_response import ApplicationCommandSubcommandOptionResponse + +class TestApplicationCommandSubcommandOptionResponse(unittest.TestCase): + """ApplicationCommandSubcommandOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandOptionResponse: + """Test ApplicationCommandSubcommandOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandOptionResponse` + """ + model = ApplicationCommandSubcommandOptionResponse() + if include_optional: + return ApplicationCommandSubcommandOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + options = [ + null + ] + ) + else: + return ApplicationCommandSubcommandOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandSubcommandOptionResponse(self): + """Test ApplicationCommandSubcommandOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_subcommand_option_response_options_inner.py b/test/test_application_command_subcommand_option_response_options_inner.py new file mode 100644 index 0000000..30e2478 --- /dev/null +++ b/test/test_application_command_subcommand_option_response_options_inner.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_subcommand_option_response_options_inner import ApplicationCommandSubcommandOptionResponseOptionsInner + +class TestApplicationCommandSubcommandOptionResponseOptionsInner(unittest.TestCase): + """ApplicationCommandSubcommandOptionResponseOptionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandSubcommandOptionResponseOptionsInner: + """Test ApplicationCommandSubcommandOptionResponseOptionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandSubcommandOptionResponseOptionsInner` + """ + model = ApplicationCommandSubcommandOptionResponseOptionsInner() + if include_optional: + return ApplicationCommandSubcommandOptionResponseOptionsInner( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True, + channel_types = [ + 56 + ], + autocomplete = True, + choices = [ + dc_rest.models.application_command_option_string_choice_response.ApplicationCommandOptionStringChoiceResponse( + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + value = '', ) + ], + min_value = 1.337, + max_value = 1.337, + min_length = 56, + max_length = 56 + ) + else: + return ApplicationCommandSubcommandOptionResponseOptionsInner( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandSubcommandOptionResponseOptionsInner(self): + """Test ApplicationCommandSubcommandOptionResponseOptionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_update_request.py b/test/test_application_command_update_request.py new file mode 100644 index 0000000..0fa6ba8 --- /dev/null +++ b/test/test_application_command_update_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_update_request import ApplicationCommandUpdateRequest + +class TestApplicationCommandUpdateRequest(unittest.TestCase): + """ApplicationCommandUpdateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandUpdateRequest: + """Test ApplicationCommandUpdateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandUpdateRequest` + """ + model = ApplicationCommandUpdateRequest() + if include_optional: + return ApplicationCommandUpdateRequest( + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '', + description_localizations = { + 'key' : '0' + }, + options = [ + null + ], + default_member_permissions = 0, + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + handler = 56, + type = 56, + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ApplicationCommandUpdateRequest( + name = '0', + ) + """ + + def testApplicationCommandUpdateRequest(self): + """Test ApplicationCommandUpdateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_user_option.py b/test/test_application_command_user_option.py new file mode 100644 index 0000000..15eda12 --- /dev/null +++ b/test/test_application_command_user_option.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_user_option import ApplicationCommandUserOption + +class TestApplicationCommandUserOption(unittest.TestCase): + """ApplicationCommandUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandUserOption: + """Test ApplicationCommandUserOption + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandUserOption` + """ + model = ApplicationCommandUserOption() + if include_optional: + return ApplicationCommandUserOption( + type = 56, + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + }, + required = True + ) + else: + return ApplicationCommandUserOption( + type = 56, + name = '0', + description = '0', + ) + """ + + def testApplicationCommandUserOption(self): + """Test ApplicationCommandUserOption""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_command_user_option_response.py b/test/test_application_command_user_option_response.py new file mode 100644 index 0000000..1ddbe8d --- /dev/null +++ b/test/test_application_command_user_option_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_command_user_option_response import ApplicationCommandUserOptionResponse + +class TestApplicationCommandUserOptionResponse(unittest.TestCase): + """ApplicationCommandUserOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationCommandUserOptionResponse: + """Test ApplicationCommandUserOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationCommandUserOptionResponse` + """ + model = ApplicationCommandUserOptionResponse() + if include_optional: + return ApplicationCommandUserOptionResponse( + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + required = True + ) + else: + return ApplicationCommandUserOptionResponse( + type = 56, + name = '', + description = '', + ) + """ + + def testApplicationCommandUserOptionResponse(self): + """Test ApplicationCommandUserOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_form_partial.py b/test/test_application_form_partial.py new file mode 100644 index 0000000..42e2b1c --- /dev/null +++ b/test/test_application_form_partial.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_form_partial import ApplicationFormPartial + +class TestApplicationFormPartial(unittest.TestCase): + """ApplicationFormPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationFormPartial: + """Test ApplicationFormPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationFormPartial` + """ + model = ApplicationFormPartial() + if include_optional: + return ApplicationFormPartial( + description = dc_rest.models.application_form_partial_description.ApplicationFormPartial_description( + default = '', + localizations = { + 'key' : '' + }, ), + icon = '', + cover_image = '', + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + interactions_endpoint_url = '', + explicit_content_filter = 56, + max_participants = -1, + type = 56, + tags = [ + '' + ], + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params.ApplicationOAuth2InstallParams( + scopes = [ + 'applications.commands' + ], + permissions = 0, ), + role_connections_verification_url = '', + integration_types_config = { + 'key' : null + } + ) + else: + return ApplicationFormPartial( + ) + """ + + def testApplicationFormPartial(self): + """Test ApplicationFormPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_form_partial_description.py b/test/test_application_form_partial_description.py new file mode 100644 index 0000000..433b8f7 --- /dev/null +++ b/test/test_application_form_partial_description.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_form_partial_description import ApplicationFormPartialDescription + +class TestApplicationFormPartialDescription(unittest.TestCase): + """ApplicationFormPartialDescription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationFormPartialDescription: + """Test ApplicationFormPartialDescription + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationFormPartialDescription` + """ + model = ApplicationFormPartialDescription() + if include_optional: + return ApplicationFormPartialDescription( + default = '', + localizations = { + 'key' : '' + } + ) + else: + return ApplicationFormPartialDescription( + default = '', + ) + """ + + def testApplicationFormPartialDescription(self): + """Test ApplicationFormPartialDescription""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_form_partial_integration_types_config_value.py b/test/test_application_form_partial_integration_types_config_value.py new file mode 100644 index 0000000..c629206 --- /dev/null +++ b/test/test_application_form_partial_integration_types_config_value.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_form_partial_integration_types_config_value import ApplicationFormPartialIntegrationTypesConfigValue + +class TestApplicationFormPartialIntegrationTypesConfigValue(unittest.TestCase): + """ApplicationFormPartialIntegrationTypesConfigValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationFormPartialIntegrationTypesConfigValue: + """Test ApplicationFormPartialIntegrationTypesConfigValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationFormPartialIntegrationTypesConfigValue` + """ + model = ApplicationFormPartialIntegrationTypesConfigValue() + if include_optional: + return ApplicationFormPartialIntegrationTypesConfigValue( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params.ApplicationOAuth2InstallParams( + scopes = [ + 'applications.commands' + ], + permissions = 0, ) + ) + else: + return ApplicationFormPartialIntegrationTypesConfigValue( + ) + """ + + def testApplicationFormPartialIntegrationTypesConfigValue(self): + """Test ApplicationFormPartialIntegrationTypesConfigValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_incoming_webhook_response.py b/test/test_application_incoming_webhook_response.py new file mode 100644 index 0000000..4998346 --- /dev/null +++ b/test/test_application_incoming_webhook_response.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_incoming_webhook_response import ApplicationIncomingWebhookResponse + +class TestApplicationIncomingWebhookResponse(unittest.TestCase): + """ApplicationIncomingWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationIncomingWebhookResponse: + """Test ApplicationIncomingWebhookResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationIncomingWebhookResponse` + """ + model = ApplicationIncomingWebhookResponse() + if include_optional: + return ApplicationIncomingWebhookResponse( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + avatar = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return ApplicationIncomingWebhookResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + ) + """ + + def testApplicationIncomingWebhookResponse(self): + """Test ApplicationIncomingWebhookResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_integration_type_configuration.py b/test/test_application_integration_type_configuration.py new file mode 100644 index 0000000..2872862 --- /dev/null +++ b/test/test_application_integration_type_configuration.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_integration_type_configuration import ApplicationIntegrationTypeConfiguration + +class TestApplicationIntegrationTypeConfiguration(unittest.TestCase): + """ApplicationIntegrationTypeConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationIntegrationTypeConfiguration: + """Test ApplicationIntegrationTypeConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationIntegrationTypeConfiguration` + """ + model = ApplicationIntegrationTypeConfiguration() + if include_optional: + return ApplicationIntegrationTypeConfiguration( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params.ApplicationOAuth2InstallParams( + scopes = [ + 'applications.commands' + ], + permissions = 0, ) + ) + else: + return ApplicationIntegrationTypeConfiguration( + ) + """ + + def testApplicationIntegrationTypeConfiguration(self): + """Test ApplicationIntegrationTypeConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_integration_type_configuration_response.py b/test/test_application_integration_type_configuration_response.py new file mode 100644 index 0000000..d071c55 --- /dev/null +++ b/test/test_application_integration_type_configuration_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_integration_type_configuration_response import ApplicationIntegrationTypeConfigurationResponse + +class TestApplicationIntegrationTypeConfigurationResponse(unittest.TestCase): + """ApplicationIntegrationTypeConfigurationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationIntegrationTypeConfigurationResponse: + """Test ApplicationIntegrationTypeConfigurationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationIntegrationTypeConfigurationResponse` + """ + model = ApplicationIntegrationTypeConfigurationResponse() + if include_optional: + return ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ) + ) + else: + return ApplicationIntegrationTypeConfigurationResponse( + ) + """ + + def testApplicationIntegrationTypeConfigurationResponse(self): + """Test ApplicationIntegrationTypeConfigurationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_o_auth2_install_params.py b/test/test_application_o_auth2_install_params.py new file mode 100644 index 0000000..a90903b --- /dev/null +++ b/test/test_application_o_auth2_install_params.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_o_auth2_install_params import ApplicationOAuth2InstallParams + +class TestApplicationOAuth2InstallParams(unittest.TestCase): + """ApplicationOAuth2InstallParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationOAuth2InstallParams: + """Test ApplicationOAuth2InstallParams + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationOAuth2InstallParams` + """ + model = ApplicationOAuth2InstallParams() + if include_optional: + return ApplicationOAuth2InstallParams( + scopes = [ + 'applications.commands' + ], + permissions = 0 + ) + else: + return ApplicationOAuth2InstallParams( + ) + """ + + def testApplicationOAuth2InstallParams(self): + """Test ApplicationOAuth2InstallParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_o_auth2_install_params_response.py b/test/test_application_o_auth2_install_params_response.py new file mode 100644 index 0000000..8fcb59d --- /dev/null +++ b/test/test_application_o_auth2_install_params_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_o_auth2_install_params_response import ApplicationOAuth2InstallParamsResponse + +class TestApplicationOAuth2InstallParamsResponse(unittest.TestCase): + """ApplicationOAuth2InstallParamsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationOAuth2InstallParamsResponse: + """Test ApplicationOAuth2InstallParamsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationOAuth2InstallParamsResponse` + """ + model = ApplicationOAuth2InstallParamsResponse() + if include_optional: + return ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '' + ) + else: + return ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', + ) + """ + + def testApplicationOAuth2InstallParamsResponse(self): + """Test ApplicationOAuth2InstallParamsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_response.py b/test/test_application_response.py new file mode 100644 index 0000000..c15ab12 --- /dev/null +++ b/test/test_application_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_response import ApplicationResponse + +class TestApplicationResponse(unittest.TestCase): + """ApplicationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationResponse: + """Test ApplicationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationResponse` + """ + model = ApplicationResponse() + if include_optional: + return ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ] + ) + else: + return ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + verify_key = '', + flags = 56, + ) + """ + + def testApplicationResponse(self): + """Test ApplicationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_role_connections_metadata_item_request.py b/test/test_application_role_connections_metadata_item_request.py new file mode 100644 index 0000000..88ab06d --- /dev/null +++ b/test/test_application_role_connections_metadata_item_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_role_connections_metadata_item_request import ApplicationRoleConnectionsMetadataItemRequest + +class TestApplicationRoleConnectionsMetadataItemRequest(unittest.TestCase): + """ApplicationRoleConnectionsMetadataItemRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationRoleConnectionsMetadataItemRequest: + """Test ApplicationRoleConnectionsMetadataItemRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationRoleConnectionsMetadataItemRequest` + """ + model = ApplicationRoleConnectionsMetadataItemRequest() + if include_optional: + return ApplicationRoleConnectionsMetadataItemRequest( + type = 56, + key = '0', + name = '0', + name_localizations = { + 'key' : '0' + }, + description = '0', + description_localizations = { + 'key' : '0' + } + ) + else: + return ApplicationRoleConnectionsMetadataItemRequest( + type = 56, + key = '0', + name = '0', + description = '0', + ) + """ + + def testApplicationRoleConnectionsMetadataItemRequest(self): + """Test ApplicationRoleConnectionsMetadataItemRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_role_connections_metadata_item_response.py b/test/test_application_role_connections_metadata_item_response.py new file mode 100644 index 0000000..5cef3ea --- /dev/null +++ b/test/test_application_role_connections_metadata_item_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_role_connections_metadata_item_response import ApplicationRoleConnectionsMetadataItemResponse + +class TestApplicationRoleConnectionsMetadataItemResponse(unittest.TestCase): + """ApplicationRoleConnectionsMetadataItemResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationRoleConnectionsMetadataItemResponse: + """Test ApplicationRoleConnectionsMetadataItemResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationRoleConnectionsMetadataItemResponse` + """ + model = ApplicationRoleConnectionsMetadataItemResponse() + if include_optional: + return ApplicationRoleConnectionsMetadataItemResponse( + type = 56, + key = '', + name = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localizations = { + 'key' : '' + } + ) + else: + return ApplicationRoleConnectionsMetadataItemResponse( + type = 56, + key = '', + name = '', + description = '', + ) + """ + + def testApplicationRoleConnectionsMetadataItemResponse(self): + """Test ApplicationRoleConnectionsMetadataItemResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_user_role_connection_response.py b/test/test_application_user_role_connection_response.py new file mode 100644 index 0000000..6ff1c59 --- /dev/null +++ b/test/test_application_user_role_connection_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.application_user_role_connection_response import ApplicationUserRoleConnectionResponse + +class TestApplicationUserRoleConnectionResponse(unittest.TestCase): + """ApplicationUserRoleConnectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationUserRoleConnectionResponse: + """Test ApplicationUserRoleConnectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationUserRoleConnectionResponse` + """ + model = ApplicationUserRoleConnectionResponse() + if include_optional: + return ApplicationUserRoleConnectionResponse( + platform_name = '', + platform_username = '', + metadata = { + 'key' : '' + } + ) + else: + return ApplicationUserRoleConnectionResponse( + ) + """ + + def testApplicationUserRoleConnectionResponse(self): + """Test ApplicationUserRoleConnectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment_response.py b/test/test_attachment_response.py new file mode 100644 index 0000000..72dd0fe --- /dev/null +++ b/test/test_attachment_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.attachment_response import AttachmentResponse + +class TestAttachmentResponse(unittest.TestCase): + """AttachmentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AttachmentResponse: + """Test AttachmentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AttachmentResponse` + """ + model = AttachmentResponse() + if include_optional: + return AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ] + ) + else: + return AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + ) + """ + + def testAttachmentResponse(self): + """Test AttachmentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_audit_log_entry_response.py b/test/test_audit_log_entry_response.py new file mode 100644 index 0000000..34fe24b --- /dev/null +++ b/test/test_audit_log_entry_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.audit_log_entry_response import AuditLogEntryResponse + +class TestAuditLogEntryResponse(unittest.TestCase): + """AuditLogEntryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditLogEntryResponse: + """Test AuditLogEntryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditLogEntryResponse` + """ + model = AuditLogEntryResponse() + if include_optional: + return AuditLogEntryResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_id = '9072888001528021798096225500850762068629339333975650685139102691291', + changes = [ + dc_rest.models.audit_log_object_change_response.AuditLogObjectChangeResponse( + key = '', + new_value = null, + old_value = null, ) + ], + options = { + 'key' : '' + }, + reason = '' + ) + else: + return AuditLogEntryResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + ) + """ + + def testAuditLogEntryResponse(self): + """Test AuditLogEntryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_audit_log_object_change_response.py b/test/test_audit_log_object_change_response.py new file mode 100644 index 0000000..52c4552 --- /dev/null +++ b/test/test_audit_log_object_change_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.audit_log_object_change_response import AuditLogObjectChangeResponse + +class TestAuditLogObjectChangeResponse(unittest.TestCase): + """AuditLogObjectChangeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditLogObjectChangeResponse: + """Test AuditLogObjectChangeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditLogObjectChangeResponse` + """ + model = AuditLogObjectChangeResponse() + if include_optional: + return AuditLogObjectChangeResponse( + key = '', + new_value = None, + old_value = None + ) + else: + return AuditLogObjectChangeResponse( + ) + """ + + def testAuditLogObjectChangeResponse(self): + """Test AuditLogObjectChangeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ban_user_from_guild_request.py b/test/test_ban_user_from_guild_request.py new file mode 100644 index 0000000..8c41395 --- /dev/null +++ b/test/test_ban_user_from_guild_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.ban_user_from_guild_request import BanUserFromGuildRequest + +class TestBanUserFromGuildRequest(unittest.TestCase): + """BanUserFromGuildRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BanUserFromGuildRequest: + """Test BanUserFromGuildRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BanUserFromGuildRequest` + """ + model = BanUserFromGuildRequest() + if include_optional: + return BanUserFromGuildRequest( + delete_message_seconds = 0, + delete_message_days = 0 + ) + else: + return BanUserFromGuildRequest( + ) + """ + + def testBanUserFromGuildRequest(self): + """Test BanUserFromGuildRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_create_message_create_request.py b/test/test_base_create_message_create_request.py new file mode 100644 index 0000000..ae1015b --- /dev/null +++ b/test/test_base_create_message_create_request.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.base_create_message_create_request import BaseCreateMessageCreateRequest + +class TestBaseCreateMessageCreateRequest(unittest.TestCase): + """BaseCreateMessageCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseCreateMessageCreateRequest: + """Test BaseCreateMessageCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseCreateMessageCreateRequest` + """ + model = BaseCreateMessageCreateRequest() + if include_optional: + return BaseCreateMessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = None + ) + else: + return BaseCreateMessageCreateRequest( + ) + """ + + def testBaseCreateMessageCreateRequest(self): + """Test BaseCreateMessageCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_create_message_create_request_components_inner.py b/test/test_base_create_message_create_request_components_inner.py new file mode 100644 index 0000000..2dd8a97 --- /dev/null +++ b/test/test_base_create_message_create_request_components_inner.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.base_create_message_create_request_components_inner import BaseCreateMessageCreateRequestComponentsInner + +class TestBaseCreateMessageCreateRequestComponentsInner(unittest.TestCase): + """BaseCreateMessageCreateRequestComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseCreateMessageCreateRequestComponentsInner: + """Test BaseCreateMessageCreateRequestComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseCreateMessageCreateRequestComponentsInner` + """ + model = BaseCreateMessageCreateRequestComponentsInner() + if include_optional: + return BaseCreateMessageCreateRequestComponentsInner( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + accent_color = 0, + spoiler = True, + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '0' + ) + else: + return BaseCreateMessageCreateRequestComponentsInner( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ], + accessory = None, + content = '0', + ) + """ + + def testBaseCreateMessageCreateRequestComponentsInner(self): + """Test BaseCreateMessageCreateRequestComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_application_response.py b/test/test_basic_application_response.py new file mode 100644 index 0000000..e3c40f8 --- /dev/null +++ b/test/test_basic_application_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.basic_application_response import BasicApplicationResponse + +class TestBasicApplicationResponse(unittest.TestCase): + """BasicApplicationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BasicApplicationResponse: + """Test BasicApplicationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BasicApplicationResponse` + """ + model = BasicApplicationResponse() + if include_optional: + return BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + ) + """ + + def testBasicApplicationResponse(self): + """Test BasicApplicationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_message_response.py b/test/test_basic_message_response.py new file mode 100644 index 0000000..35160cc --- /dev/null +++ b/test/test_basic_message_response.py @@ -0,0 +1,938 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.basic_message_response import BasicMessageResponse + +class TestBasicMessageResponse(unittest.TestCase): + """BasicMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BasicMessageResponse: + """Test BasicMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BasicMessageResponse` + """ + model = BasicMessageResponse() + if include_optional: + return BasicMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', + flags = , ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', + flags = , ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = None, + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + name_localized = '', ), + nonce = None, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = None, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], ), ) + ] + ) + else: + return BasicMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', + flags = , ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', + flags = , ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + pinned = True, + mention_everyone = True, + tts = True, + ) + """ + + def testBasicMessageResponse(self): + """Test BasicMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_message_response_components_inner.py b/test/test_basic_message_response_components_inner.py new file mode 100644 index 0000000..6463f3b --- /dev/null +++ b/test/test_basic_message_response_components_inner.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.basic_message_response_components_inner import BasicMessageResponseComponentsInner + +class TestBasicMessageResponseComponentsInner(unittest.TestCase): + """BasicMessageResponseComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BasicMessageResponseComponentsInner: + """Test BasicMessageResponseComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BasicMessageResponseComponentsInner` + """ + model = BasicMessageResponseComponentsInner() + if include_optional: + return BasicMessageResponseComponentsInner( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + accent_color = 56, + spoiler = True, + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + name = '', + size = 56, + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '' + ) + else: + return BasicMessageResponseComponentsInner( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + spoiler = True, + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '', + ) + """ + + def testBasicMessageResponseComponentsInner(self): + """Test BasicMessageResponseComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_message_response_interaction_metadata.py b/test/test_basic_message_response_interaction_metadata.py new file mode 100644 index 0000000..1c6193c --- /dev/null +++ b/test/test_basic_message_response_interaction_metadata.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.basic_message_response_interaction_metadata import BasicMessageResponseInteractionMetadata + +class TestBasicMessageResponseInteractionMetadata(unittest.TestCase): + """BasicMessageResponseInteractionMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BasicMessageResponseInteractionMetadata: + """Test BasicMessageResponseInteractionMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BasicMessageResponseInteractionMetadata` + """ + model = BasicMessageResponseInteractionMetadata() + if include_optional: + return BasicMessageResponseInteractionMetadata( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + original_response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + target_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + triggering_interaction_metadata = None + ) + else: + return BasicMessageResponseInteractionMetadata( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + triggering_interaction_metadata = None, + ) + """ + + def testBasicMessageResponseInteractionMetadata(self): + """Test BasicMessageResponseInteractionMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_message_response_nonce.py b/test/test_basic_message_response_nonce.py new file mode 100644 index 0000000..a0a3972 --- /dev/null +++ b/test/test_basic_message_response_nonce.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.basic_message_response_nonce import BasicMessageResponseNonce + +class TestBasicMessageResponseNonce(unittest.TestCase): + """BasicMessageResponseNonce unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BasicMessageResponseNonce: + """Test BasicMessageResponseNonce + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BasicMessageResponseNonce` + """ + model = BasicMessageResponseNonce() + if include_optional: + return BasicMessageResponseNonce( + ) + else: + return BasicMessageResponseNonce( + ) + """ + + def testBasicMessageResponseNonce(self): + """Test BasicMessageResponseNonce""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_block_message_action.py b/test/test_block_message_action.py new file mode 100644 index 0000000..ea58914 --- /dev/null +++ b/test/test_block_message_action.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.block_message_action import BlockMessageAction + +class TestBlockMessageAction(unittest.TestCase): + """BlockMessageAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockMessageAction: + """Test BlockMessageAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BlockMessageAction` + """ + model = BlockMessageAction() + if include_optional: + return BlockMessageAction( + type = 56, + metadata = dc_rest.models.block_message_action_metadata.BlockMessageActionMetadata( + custom_message = '', ) + ) + else: + return BlockMessageAction( + type = 56, + ) + """ + + def testBlockMessageAction(self): + """Test BlockMessageAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_block_message_action_metadata.py b/test/test_block_message_action_metadata.py new file mode 100644 index 0000000..afe5a99 --- /dev/null +++ b/test/test_block_message_action_metadata.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.block_message_action_metadata import BlockMessageActionMetadata + +class TestBlockMessageActionMetadata(unittest.TestCase): + """BlockMessageActionMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockMessageActionMetadata: + """Test BlockMessageActionMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BlockMessageActionMetadata` + """ + model = BlockMessageActionMetadata() + if include_optional: + return BlockMessageActionMetadata( + custom_message = '' + ) + else: + return BlockMessageActionMetadata( + ) + """ + + def testBlockMessageActionMetadata(self): + """Test BlockMessageActionMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_block_message_action_metadata_response.py b/test/test_block_message_action_metadata_response.py new file mode 100644 index 0000000..c88b7e4 --- /dev/null +++ b/test/test_block_message_action_metadata_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.block_message_action_metadata_response import BlockMessageActionMetadataResponse + +class TestBlockMessageActionMetadataResponse(unittest.TestCase): + """BlockMessageActionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockMessageActionMetadataResponse: + """Test BlockMessageActionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BlockMessageActionMetadataResponse` + """ + model = BlockMessageActionMetadataResponse() + if include_optional: + return BlockMessageActionMetadataResponse( + custom_message = '' + ) + else: + return BlockMessageActionMetadataResponse( + ) + """ + + def testBlockMessageActionMetadataResponse(self): + """Test BlockMessageActionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_block_message_action_response.py b/test/test_block_message_action_response.py new file mode 100644 index 0000000..2f9ea8a --- /dev/null +++ b/test/test_block_message_action_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.block_message_action_response import BlockMessageActionResponse + +class TestBlockMessageActionResponse(unittest.TestCase): + """BlockMessageActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockMessageActionResponse: + """Test BlockMessageActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BlockMessageActionResponse` + """ + model = BlockMessageActionResponse() + if include_optional: + return BlockMessageActionResponse( + type = 56, + metadata = dc_rest.models.block_message_action_metadata_response.BlockMessageActionMetadataResponse( + custom_message = '', ) + ) + else: + return BlockMessageActionResponse( + type = 56, + metadata = dc_rest.models.block_message_action_metadata_response.BlockMessageActionMetadataResponse( + custom_message = '', ), + ) + """ + + def testBlockMessageActionResponse(self): + """Test BlockMessageActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bot_account_patch_request.py b/test/test_bot_account_patch_request.py new file mode 100644 index 0000000..4555b77 --- /dev/null +++ b/test/test_bot_account_patch_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bot_account_patch_request import BotAccountPatchRequest + +class TestBotAccountPatchRequest(unittest.TestCase): + """BotAccountPatchRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BotAccountPatchRequest: + """Test BotAccountPatchRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BotAccountPatchRequest` + """ + model = BotAccountPatchRequest() + if include_optional: + return BotAccountPatchRequest( + username = '01', + avatar = '', + banner = '' + ) + else: + return BotAccountPatchRequest( + username = '01', + ) + """ + + def testBotAccountPatchRequest(self): + """Test BotAccountPatchRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_ban_users_from_guild_request.py b/test/test_bulk_ban_users_from_guild_request.py new file mode 100644 index 0000000..766591e --- /dev/null +++ b/test/test_bulk_ban_users_from_guild_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_ban_users_from_guild_request import BulkBanUsersFromGuildRequest + +class TestBulkBanUsersFromGuildRequest(unittest.TestCase): + """BulkBanUsersFromGuildRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkBanUsersFromGuildRequest: + """Test BulkBanUsersFromGuildRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkBanUsersFromGuildRequest` + """ + model = BulkBanUsersFromGuildRequest() + if include_optional: + return BulkBanUsersFromGuildRequest( + user_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + delete_message_seconds = 0 + ) + else: + return BulkBanUsersFromGuildRequest( + user_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testBulkBanUsersFromGuildRequest(self): + """Test BulkBanUsersFromGuildRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_ban_users_response.py b/test/test_bulk_ban_users_response.py new file mode 100644 index 0000000..c7bafe4 --- /dev/null +++ b/test/test_bulk_ban_users_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_ban_users_response import BulkBanUsersResponse + +class TestBulkBanUsersResponse(unittest.TestCase): + """BulkBanUsersResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkBanUsersResponse: + """Test BulkBanUsersResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkBanUsersResponse` + """ + model = BulkBanUsersResponse() + if include_optional: + return BulkBanUsersResponse( + banned_users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + failed_users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return BulkBanUsersResponse( + banned_users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + failed_users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testBulkBanUsersResponse(self): + """Test BulkBanUsersResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_delete_messages_request.py b/test/test_bulk_delete_messages_request.py new file mode 100644 index 0000000..6b97fd7 --- /dev/null +++ b/test/test_bulk_delete_messages_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_delete_messages_request import BulkDeleteMessagesRequest + +class TestBulkDeleteMessagesRequest(unittest.TestCase): + """BulkDeleteMessagesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkDeleteMessagesRequest: + """Test BulkDeleteMessagesRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkDeleteMessagesRequest` + """ + model = BulkDeleteMessagesRequest() + if include_optional: + return BulkDeleteMessagesRequest( + messages = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return BulkDeleteMessagesRequest( + messages = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testBulkDeleteMessagesRequest(self): + """Test BulkDeleteMessagesRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_lobby_member_request.py b/test/test_bulk_lobby_member_request.py new file mode 100644 index 0000000..c230968 --- /dev/null +++ b/test/test_bulk_lobby_member_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_lobby_member_request import BulkLobbyMemberRequest + +class TestBulkLobbyMemberRequest(unittest.TestCase): + """BulkLobbyMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkLobbyMemberRequest: + """Test BulkLobbyMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkLobbyMemberRequest` + """ + model = BulkLobbyMemberRequest() + if include_optional: + return BulkLobbyMemberRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + flags = 1, + remove_member = True + ) + else: + return BulkLobbyMemberRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testBulkLobbyMemberRequest(self): + """Test BulkLobbyMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_update_guild_channels_request_inner.py b/test/test_bulk_update_guild_channels_request_inner.py new file mode 100644 index 0000000..d2b0a83 --- /dev/null +++ b/test/test_bulk_update_guild_channels_request_inner.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_update_guild_channels_request_inner import BulkUpdateGuildChannelsRequestInner + +class TestBulkUpdateGuildChannelsRequestInner(unittest.TestCase): + """BulkUpdateGuildChannelsRequestInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkUpdateGuildChannelsRequestInner: + """Test BulkUpdateGuildChannelsRequestInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkUpdateGuildChannelsRequestInner` + """ + model = BulkUpdateGuildChannelsRequestInner() + if include_optional: + return BulkUpdateGuildChannelsRequestInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + lock_permissions = True + ) + else: + return BulkUpdateGuildChannelsRequestInner( + ) + """ + + def testBulkUpdateGuildChannelsRequestInner(self): + """Test BulkUpdateGuildChannelsRequestInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_update_guild_roles_request_inner.py b/test/test_bulk_update_guild_roles_request_inner.py new file mode 100644 index 0000000..a3cca20 --- /dev/null +++ b/test/test_bulk_update_guild_roles_request_inner.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.bulk_update_guild_roles_request_inner import BulkUpdateGuildRolesRequestInner + +class TestBulkUpdateGuildRolesRequestInner(unittest.TestCase): + """BulkUpdateGuildRolesRequestInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkUpdateGuildRolesRequestInner: + """Test BulkUpdateGuildRolesRequestInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkUpdateGuildRolesRequestInner` + """ + model = BulkUpdateGuildRolesRequestInner() + if include_optional: + return BulkUpdateGuildRolesRequestInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56 + ) + else: + return BulkUpdateGuildRolesRequestInner( + ) + """ + + def testBulkUpdateGuildRolesRequestInner(self): + """Test BulkUpdateGuildRolesRequestInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_button_component_for_message_request.py b/test/test_button_component_for_message_request.py new file mode 100644 index 0000000..68f1bd6 --- /dev/null +++ b/test/test_button_component_for_message_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.button_component_for_message_request import ButtonComponentForMessageRequest + +class TestButtonComponentForMessageRequest(unittest.TestCase): + """ButtonComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ButtonComponentForMessageRequest: + """Test ButtonComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ButtonComponentForMessageRequest` + """ + model = ButtonComponentForMessageRequest() + if include_optional: + return ButtonComponentForMessageRequest( + type = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ) + ) + else: + return ButtonComponentForMessageRequest( + type = 56, + style = 56, + ) + """ + + def testButtonComponentForMessageRequest(self): + """Test ButtonComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_button_component_response.py b/test/test_button_component_response.py new file mode 100644 index 0000000..0910d83 --- /dev/null +++ b/test/test_button_component_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.button_component_response import ButtonComponentResponse + +class TestButtonComponentResponse(unittest.TestCase): + """ButtonComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ButtonComponentResponse: + """Test ButtonComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ButtonComponentResponse` + """ + model = ButtonComponentResponse() + if include_optional: + return ButtonComponentResponse( + type = 56, + id = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ButtonComponentResponse( + type = 56, + id = 56, + style = 56, + ) + """ + + def testButtonComponentResponse(self): + """Test ButtonComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_follower_response.py b/test/test_channel_follower_response.py new file mode 100644 index 0000000..8e9c760 --- /dev/null +++ b/test/test_channel_follower_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_follower_response import ChannelFollowerResponse + +class TestChannelFollowerResponse(unittest.TestCase): + """ChannelFollowerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelFollowerResponse: + """Test ChannelFollowerResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelFollowerResponse` + """ + model = ChannelFollowerResponse() + if include_optional: + return ChannelFollowerResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ChannelFollowerResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testChannelFollowerResponse(self): + """Test ChannelFollowerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_follower_webhook_response.py b/test/test_channel_follower_webhook_response.py new file mode 100644 index 0000000..0828a5a --- /dev/null +++ b/test/test_channel_follower_webhook_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_follower_webhook_response import ChannelFollowerWebhookResponse + +class TestChannelFollowerWebhookResponse(unittest.TestCase): + """ChannelFollowerWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelFollowerWebhookResponse: + """Test ChannelFollowerWebhookResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelFollowerWebhookResponse` + """ + model = ChannelFollowerWebhookResponse() + if include_optional: + return ChannelFollowerWebhookResponse( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + avatar = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + source_guild = dc_rest.models.webhook_source_guild_response.WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', ), + source_channel = dc_rest.models.webhook_source_channel_response.WebhookSourceChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ) + ) + else: + return ChannelFollowerWebhookResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + ) + """ + + def testChannelFollowerWebhookResponse(self): + """Test ChannelFollowerWebhookResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_permission_overwrite_request.py b/test/test_channel_permission_overwrite_request.py new file mode 100644 index 0000000..0223101 --- /dev/null +++ b/test/test_channel_permission_overwrite_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_permission_overwrite_request import ChannelPermissionOverwriteRequest + +class TestChannelPermissionOverwriteRequest(unittest.TestCase): + """ChannelPermissionOverwriteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelPermissionOverwriteRequest: + """Test ChannelPermissionOverwriteRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelPermissionOverwriteRequest` + """ + model = ChannelPermissionOverwriteRequest() + if include_optional: + return ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56 + ) + else: + return ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testChannelPermissionOverwriteRequest(self): + """Test ChannelPermissionOverwriteRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_permission_overwrite_response.py b/test/test_channel_permission_overwrite_response.py new file mode 100644 index 0000000..d1c4553 --- /dev/null +++ b/test/test_channel_permission_overwrite_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_permission_overwrite_response import ChannelPermissionOverwriteResponse + +class TestChannelPermissionOverwriteResponse(unittest.TestCase): + """ChannelPermissionOverwriteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelPermissionOverwriteResponse: + """Test ChannelPermissionOverwriteResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelPermissionOverwriteResponse` + """ + model = ChannelPermissionOverwriteResponse() + if include_optional: + return ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '' + ) + else: + return ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', + ) + """ + + def testChannelPermissionOverwriteResponse(self): + """Test ChannelPermissionOverwriteResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_select_component_for_message_request.py b/test/test_channel_select_component_for_message_request.py new file mode 100644 index 0000000..330e716 --- /dev/null +++ b/test/test_channel_select_component_for_message_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_select_component_for_message_request import ChannelSelectComponentForMessageRequest + +class TestChannelSelectComponentForMessageRequest(unittest.TestCase): + """ChannelSelectComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelSelectComponentForMessageRequest: + """Test ChannelSelectComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelSelectComponentForMessageRequest` + """ + model = ChannelSelectComponentForMessageRequest() + if include_optional: + return ChannelSelectComponentForMessageRequest( + type = 56, + custom_id = '', + placeholder = '', + min_values = 0, + max_values = 1, + disabled = True, + default_values = [ + dc_rest.models.channel_select_default_value.ChannelSelectDefaultValue( + type = 'channel', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + channel_types = [ + 56 + ] + ) + else: + return ChannelSelectComponentForMessageRequest( + type = 56, + custom_id = '', + ) + """ + + def testChannelSelectComponentForMessageRequest(self): + """Test ChannelSelectComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_select_component_response.py b/test/test_channel_select_component_response.py new file mode 100644 index 0000000..469be9b --- /dev/null +++ b/test/test_channel_select_component_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_select_component_response import ChannelSelectComponentResponse + +class TestChannelSelectComponentResponse(unittest.TestCase): + """ChannelSelectComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelSelectComponentResponse: + """Test ChannelSelectComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelSelectComponentResponse` + """ + model = ChannelSelectComponentResponse() + if include_optional: + return ChannelSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + placeholder = '', + min_values = 56, + max_values = 56, + disabled = True, + channel_types = [ + 56 + ], + default_values = [ + dc_rest.models.channel_select_default_value.ChannelSelectDefaultValue( + type = 'channel', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return ChannelSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + ) + """ + + def testChannelSelectComponentResponse(self): + """Test ChannelSelectComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_select_default_value.py b/test/test_channel_select_default_value.py new file mode 100644 index 0000000..6cb2729 --- /dev/null +++ b/test/test_channel_select_default_value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_select_default_value import ChannelSelectDefaultValue + +class TestChannelSelectDefaultValue(unittest.TestCase): + """ChannelSelectDefaultValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelSelectDefaultValue: + """Test ChannelSelectDefaultValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelSelectDefaultValue` + """ + model = ChannelSelectDefaultValue() + if include_optional: + return ChannelSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ChannelSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testChannelSelectDefaultValue(self): + """Test ChannelSelectDefaultValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_channel_select_default_value_response.py b/test/test_channel_select_default_value_response.py new file mode 100644 index 0000000..df51b01 --- /dev/null +++ b/test/test_channel_select_default_value_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.channel_select_default_value_response import ChannelSelectDefaultValueResponse + +class TestChannelSelectDefaultValueResponse(unittest.TestCase): + """ChannelSelectDefaultValueResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelSelectDefaultValueResponse: + """Test ChannelSelectDefaultValueResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelSelectDefaultValueResponse` + """ + model = ChannelSelectDefaultValueResponse() + if include_optional: + return ChannelSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ChannelSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testChannelSelectDefaultValueResponse(self): + """Test ChannelSelectDefaultValueResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_command_permission_response.py b/test/test_command_permission_response.py new file mode 100644 index 0000000..761a004 --- /dev/null +++ b/test/test_command_permission_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.command_permission_response import CommandPermissionResponse + +class TestCommandPermissionResponse(unittest.TestCase): + """CommandPermissionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommandPermissionResponse: + """Test CommandPermissionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommandPermissionResponse` + """ + model = CommandPermissionResponse() + if include_optional: + return CommandPermissionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True + ) + else: + return CommandPermissionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True, + ) + """ + + def testCommandPermissionResponse(self): + """Test CommandPermissionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_command_permissions_response.py b/test/test_command_permissions_response.py new file mode 100644 index 0000000..29d8faf --- /dev/null +++ b/test/test_command_permissions_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.command_permissions_response import CommandPermissionsResponse + +class TestCommandPermissionsResponse(unittest.TestCase): + """CommandPermissionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommandPermissionsResponse: + """Test CommandPermissionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommandPermissionsResponse` + """ + model = CommandPermissionsResponse() + if include_optional: + return CommandPermissionsResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permissions = [ + dc_rest.models.command_permission_response.CommandPermissionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True, ) + ] + ) + else: + return CommandPermissionsResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permissions = [ + dc_rest.models.command_permission_response.CommandPermissionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True, ) + ], + ) + """ + + def testCommandPermissionsResponse(self): + """Test CommandPermissionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_component_emoji_for_message_request.py b/test/test_component_emoji_for_message_request.py new file mode 100644 index 0000000..b7f4a92 --- /dev/null +++ b/test/test_component_emoji_for_message_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.component_emoji_for_message_request import ComponentEmojiForMessageRequest + +class TestComponentEmojiForMessageRequest(unittest.TestCase): + """ComponentEmojiForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ComponentEmojiForMessageRequest: + """Test ComponentEmojiForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ComponentEmojiForMessageRequest` + """ + model = ComponentEmojiForMessageRequest() + if include_optional: + return ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '' + ) + else: + return ComponentEmojiForMessageRequest( + name = '', + ) + """ + + def testComponentEmojiForMessageRequest(self): + """Test ComponentEmojiForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_component_emoji_response.py b/test/test_component_emoji_response.py new file mode 100644 index 0000000..c62d68d --- /dev/null +++ b/test/test_component_emoji_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.component_emoji_response import ComponentEmojiResponse + +class TestComponentEmojiResponse(unittest.TestCase): + """ComponentEmojiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ComponentEmojiResponse: + """Test ComponentEmojiResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ComponentEmojiResponse` + """ + model = ComponentEmojiResponse() + if include_optional: + return ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True + ) + else: + return ComponentEmojiResponse( + name = '', + ) + """ + + def testComponentEmojiResponse(self): + """Test ComponentEmojiResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connected_account_guild_response.py b/test/test_connected_account_guild_response.py new file mode 100644 index 0000000..e9f34e7 --- /dev/null +++ b/test/test_connected_account_guild_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.connected_account_guild_response import ConnectedAccountGuildResponse + +class TestConnectedAccountGuildResponse(unittest.TestCase): + """ConnectedAccountGuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectedAccountGuildResponse: + """Test ConnectedAccountGuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectedAccountGuildResponse` + """ + model = ConnectedAccountGuildResponse() + if include_optional: + return ConnectedAccountGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '' + ) + else: + return ConnectedAccountGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + ) + """ + + def testConnectedAccountGuildResponse(self): + """Test ConnectedAccountGuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connected_account_integration_response.py b/test/test_connected_account_integration_response.py new file mode 100644 index 0000000..4bf9f65 --- /dev/null +++ b/test/test_connected_account_integration_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.connected_account_integration_response import ConnectedAccountIntegrationResponse + +class TestConnectedAccountIntegrationResponse(unittest.TestCase): + """ConnectedAccountIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectedAccountIntegrationResponse: + """Test ConnectedAccountIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectedAccountIntegrationResponse` + """ + model = ConnectedAccountIntegrationResponse() + if include_optional: + return ConnectedAccountIntegrationResponse( + id = '', + type = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + guild = dc_rest.models.webhook_source_guild_response.WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', ) + ) + else: + return ConnectedAccountIntegrationResponse( + id = '', + type = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + guild = dc_rest.models.webhook_source_guild_response.WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', ), + ) + """ + + def testConnectedAccountIntegrationResponse(self): + """Test ConnectedAccountIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connected_account_response.py b/test/test_connected_account_response.py new file mode 100644 index 0000000..893663f --- /dev/null +++ b/test/test_connected_account_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.connected_account_response import ConnectedAccountResponse + +class TestConnectedAccountResponse(unittest.TestCase): + """ConnectedAccountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectedAccountResponse: + """Test ConnectedAccountResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectedAccountResponse` + """ + model = ConnectedAccountResponse() + if include_optional: + return ConnectedAccountResponse( + id = '', + name = '', + type = '', + friend_sync = True, + integrations = [ + dc_rest.models.connected_account_integration_response.ConnectedAccountIntegrationResponse( + id = '', + type = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + guild = dc_rest.models.webhook_source_guild_response.WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', ), ) + ], + show_activity = True, + two_way_link = True, + verified = True, + visibility = 56, + revoked = True + ) + else: + return ConnectedAccountResponse( + id = '', + type = '', + friend_sync = True, + show_activity = True, + two_way_link = True, + verified = True, + visibility = 56, + ) + """ + + def testConnectedAccountResponse(self): + """Test ConnectedAccountResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_container_component_for_message_request.py b/test/test_container_component_for_message_request.py new file mode 100644 index 0000000..f9352a6 --- /dev/null +++ b/test/test_container_component_for_message_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.container_component_for_message_request import ContainerComponentForMessageRequest + +class TestContainerComponentForMessageRequest(unittest.TestCase): + """ContainerComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContainerComponentForMessageRequest: + """Test ContainerComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContainerComponentForMessageRequest` + """ + model = ContainerComponentForMessageRequest() + if include_optional: + return ContainerComponentForMessageRequest( + type = 56, + accent_color = 0, + components = [ + null + ], + spoiler = True + ) + else: + return ContainerComponentForMessageRequest( + type = 56, + components = [ + null + ], + ) + """ + + def testContainerComponentForMessageRequest(self): + """Test ContainerComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_container_component_for_message_request_components_inner.py b/test/test_container_component_for_message_request_components_inner.py new file mode 100644 index 0000000..afb160c --- /dev/null +++ b/test/test_container_component_for_message_request_components_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.container_component_for_message_request_components_inner import ContainerComponentForMessageRequestComponentsInner + +class TestContainerComponentForMessageRequestComponentsInner(unittest.TestCase): + """ContainerComponentForMessageRequestComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContainerComponentForMessageRequestComponentsInner: + """Test ContainerComponentForMessageRequestComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContainerComponentForMessageRequestComponentsInner` + """ + model = ContainerComponentForMessageRequestComponentsInner() + if include_optional: + return ContainerComponentForMessageRequestComponentsInner( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + spoiler = True, + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '0' + ) + else: + return ContainerComponentForMessageRequestComponentsInner( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ], + accessory = None, + content = '0', + ) + """ + + def testContainerComponentForMessageRequestComponentsInner(self): + """Test ContainerComponentForMessageRequestComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_container_component_response.py b/test/test_container_component_response.py new file mode 100644 index 0000000..b59d9ce --- /dev/null +++ b/test/test_container_component_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.container_component_response import ContainerComponentResponse + +class TestContainerComponentResponse(unittest.TestCase): + """ContainerComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContainerComponentResponse: + """Test ContainerComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContainerComponentResponse` + """ + model = ContainerComponentResponse() + if include_optional: + return ContainerComponentResponse( + type = 56, + id = 56, + accent_color = 56, + components = [ + null + ], + spoiler = True + ) + else: + return ContainerComponentResponse( + type = 56, + id = 56, + components = [ + null + ], + spoiler = True, + ) + """ + + def testContainerComponentResponse(self): + """Test ContainerComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_container_component_response_components_inner.py b/test/test_container_component_response_components_inner.py new file mode 100644 index 0000000..0eac403 --- /dev/null +++ b/test/test_container_component_response_components_inner.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.container_component_response_components_inner import ContainerComponentResponseComponentsInner + +class TestContainerComponentResponseComponentsInner(unittest.TestCase): + """ContainerComponentResponseComponentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContainerComponentResponseComponentsInner: + """Test ContainerComponentResponseComponentsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContainerComponentResponseComponentsInner` + """ + model = ContainerComponentResponseComponentsInner() + if include_optional: + return ContainerComponentResponseComponentsInner( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + name = '', + size = 56, + spoiler = True, + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '' + ) + else: + return ContainerComponentResponseComponentsInner( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + spoiler = True, + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ], + accessory = None, + spacing = 56, + divider = True, + content = '', + ) + """ + + def testContainerComponentResponseComponentsInner(self): + """Test ContainerComponentResponseComponentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_application_emoji_request.py b/test/test_create_application_emoji_request.py new file mode 100644 index 0000000..932414a --- /dev/null +++ b/test/test_create_application_emoji_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_application_emoji_request import CreateApplicationEmojiRequest + +class TestCreateApplicationEmojiRequest(unittest.TestCase): + """CreateApplicationEmojiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateApplicationEmojiRequest: + """Test CreateApplicationEmojiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateApplicationEmojiRequest` + """ + model = CreateApplicationEmojiRequest() + if include_optional: + return CreateApplicationEmojiRequest( + name = '01', + image = '' + ) + else: + return CreateApplicationEmojiRequest( + name = '01', + image = '', + ) + """ + + def testCreateApplicationEmojiRequest(self): + """Test CreateApplicationEmojiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_auto_moderation_rule200_response.py b/test/test_create_auto_moderation_rule200_response.py new file mode 100644 index 0000000..0d64202 --- /dev/null +++ b/test/test_create_auto_moderation_rule200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_auto_moderation_rule200_response import CreateAutoModerationRule200Response + +class TestCreateAutoModerationRule200Response(unittest.TestCase): + """CreateAutoModerationRule200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAutoModerationRule200Response: + """Test CreateAutoModerationRule200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAutoModerationRule200Response` + """ + model = CreateAutoModerationRule200Response() + if include_optional: + return CreateAutoModerationRule200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return CreateAutoModerationRule200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testCreateAutoModerationRule200Response(self): + """Test CreateAutoModerationRule200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_auto_moderation_rule_request.py b/test/test_create_auto_moderation_rule_request.py new file mode 100644 index 0000000..84ea7f5 --- /dev/null +++ b/test/test_create_auto_moderation_rule_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_auto_moderation_rule_request import CreateAutoModerationRuleRequest + +class TestCreateAutoModerationRuleRequest(unittest.TestCase): + """CreateAutoModerationRuleRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAutoModerationRuleRequest: + """Test CreateAutoModerationRuleRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAutoModerationRuleRequest` + """ + model = CreateAutoModerationRuleRequest() + if include_optional: + return CreateAutoModerationRuleRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata.MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True, ) + ) + else: + return CreateAutoModerationRuleRequest( + name = '', + event_type = 56, + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata.MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True, ), + ) + """ + + def testCreateAutoModerationRuleRequest(self): + """Test CreateAutoModerationRuleRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_channel_invite_request.py b/test/test_create_channel_invite_request.py new file mode 100644 index 0000000..12e47c5 --- /dev/null +++ b/test/test_create_channel_invite_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_channel_invite_request import CreateChannelInviteRequest + +class TestCreateChannelInviteRequest(unittest.TestCase): + """CreateChannelInviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateChannelInviteRequest: + """Test CreateChannelInviteRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateChannelInviteRequest` + """ + model = CreateChannelInviteRequest() + if include_optional: + return CreateChannelInviteRequest( + max_age = 0, + temporary = True, + max_uses = 0, + unique = True, + target_user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_type = 56 + ) + else: + return CreateChannelInviteRequest( + ) + """ + + def testCreateChannelInviteRequest(self): + """Test CreateChannelInviteRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_entitlement_request_data.py b/test/test_create_entitlement_request_data.py new file mode 100644 index 0000000..01e9c59 --- /dev/null +++ b/test/test_create_entitlement_request_data.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_entitlement_request_data import CreateEntitlementRequestData + +class TestCreateEntitlementRequestData(unittest.TestCase): + """CreateEntitlementRequestData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateEntitlementRequestData: + """Test CreateEntitlementRequestData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateEntitlementRequestData` + """ + model = CreateEntitlementRequestData() + if include_optional: + return CreateEntitlementRequestData( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + owner_type = 56 + ) + else: + return CreateEntitlementRequestData( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + owner_type = 56, + ) + """ + + def testCreateEntitlementRequestData(self): + """Test CreateEntitlementRequestData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_forum_thread_request.py b/test/test_create_forum_thread_request.py new file mode 100644 index 0000000..1dd0cf6 --- /dev/null +++ b/test/test_create_forum_thread_request.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_forum_thread_request import CreateForumThreadRequest + +class TestCreateForumThreadRequest(unittest.TestCase): + """CreateForumThreadRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateForumThreadRequest: + """Test CreateForumThreadRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateForumThreadRequest` + """ + model = CreateForumThreadRequest() + if include_optional: + return CreateForumThreadRequest( + name = '0', + auto_archive_duration = 56, + rate_limit_per_user = 0, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + message = dc_rest.models.base_create_message_create_request.BaseCreateMessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), ) + ) + else: + return CreateForumThreadRequest( + name = '0', + message = dc_rest.models.base_create_message_create_request.BaseCreateMessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), ), + ) + """ + + def testCreateForumThreadRequest(self): + """Test CreateForumThreadRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_group_dm_invite_request.py b/test/test_create_group_dm_invite_request.py new file mode 100644 index 0000000..10f74e2 --- /dev/null +++ b/test/test_create_group_dm_invite_request.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_group_dm_invite_request import CreateGroupDMInviteRequest + +class TestCreateGroupDMInviteRequest(unittest.TestCase): + """CreateGroupDMInviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGroupDMInviteRequest: + """Test CreateGroupDMInviteRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGroupDMInviteRequest` + """ + model = CreateGroupDMInviteRequest() + if include_optional: + return CreateGroupDMInviteRequest( + max_age = 1 + ) + else: + return CreateGroupDMInviteRequest( + ) + """ + + def testCreateGroupDMInviteRequest(self): + """Test CreateGroupDMInviteRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_channel_request.py b/test/test_create_guild_channel_request.py new file mode 100644 index 0000000..e0b6179 --- /dev/null +++ b/test/test_create_guild_channel_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_channel_request import CreateGuildChannelRequest + +class TestCreateGuildChannelRequest(unittest.TestCase): + """CreateGuildChannelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildChannelRequest: + """Test CreateGuildChannelRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildChannelRequest` + """ + model = CreateGuildChannelRequest() + if include_optional: + return CreateGuildChannelRequest( + type = 56, + name = '0', + position = 0, + topic = '', + bitrate = 8000, + user_limit = 0, + nsfw = True, + rate_limit_per_user = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_request.ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56, ) + ], + rtc_region = '', + video_quality_mode = 56, + default_auto_archive_duration = 56, + default_reaction_emoji = dc_rest.models.update_default_reaction_emoji_request.UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 0, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + available_tags = [ + dc_rest.models.create_or_update_thread_tag_request.CreateOrUpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ] + ) + else: + return CreateGuildChannelRequest( + name = '0', + ) + """ + + def testCreateGuildChannelRequest(self): + """Test CreateGuildChannelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_emoji_request.py b/test/test_create_guild_emoji_request.py new file mode 100644 index 0000000..48b15f4 --- /dev/null +++ b/test/test_create_guild_emoji_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_emoji_request import CreateGuildEmojiRequest + +class TestCreateGuildEmojiRequest(unittest.TestCase): + """CreateGuildEmojiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildEmojiRequest: + """Test CreateGuildEmojiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildEmojiRequest` + """ + model = CreateGuildEmojiRequest() + if include_optional: + return CreateGuildEmojiRequest( + name = '01', + image = '', + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return CreateGuildEmojiRequest( + name = '01', + image = '', + ) + """ + + def testCreateGuildEmojiRequest(self): + """Test CreateGuildEmojiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_from_template_request.py b/test/test_create_guild_from_template_request.py new file mode 100644 index 0000000..11e83ce --- /dev/null +++ b/test/test_create_guild_from_template_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_from_template_request import CreateGuildFromTemplateRequest + +class TestCreateGuildFromTemplateRequest(unittest.TestCase): + """CreateGuildFromTemplateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildFromTemplateRequest: + """Test CreateGuildFromTemplateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildFromTemplateRequest` + """ + model = CreateGuildFromTemplateRequest() + if include_optional: + return CreateGuildFromTemplateRequest( + name = '01', + icon = '' + ) + else: + return CreateGuildFromTemplateRequest( + name = '01', + ) + """ + + def testCreateGuildFromTemplateRequest(self): + """Test CreateGuildFromTemplateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_invite_request.py b/test/test_create_guild_invite_request.py new file mode 100644 index 0000000..556dd0c --- /dev/null +++ b/test/test_create_guild_invite_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_invite_request import CreateGuildInviteRequest + +class TestCreateGuildInviteRequest(unittest.TestCase): + """CreateGuildInviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildInviteRequest: + """Test CreateGuildInviteRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildInviteRequest` + """ + model = CreateGuildInviteRequest() + if include_optional: + return CreateGuildInviteRequest( + max_age = 0, + temporary = True, + max_uses = 0, + unique = True, + target_user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_type = 56 + ) + else: + return CreateGuildInviteRequest( + ) + """ + + def testCreateGuildInviteRequest(self): + """Test CreateGuildInviteRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_request_channel_item.py b/test/test_create_guild_request_channel_item.py new file mode 100644 index 0000000..d68e6d3 --- /dev/null +++ b/test/test_create_guild_request_channel_item.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_request_channel_item import CreateGuildRequestChannelItem + +class TestCreateGuildRequestChannelItem(unittest.TestCase): + """CreateGuildRequestChannelItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildRequestChannelItem: + """Test CreateGuildRequestChannelItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildRequestChannelItem` + """ + model = CreateGuildRequestChannelItem() + if include_optional: + return CreateGuildRequestChannelItem( + type = 56, + name = '0', + position = 0, + topic = '', + bitrate = 8000, + user_limit = 0, + nsfw = True, + rate_limit_per_user = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_request.ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56, ) + ], + rtc_region = '', + video_quality_mode = 56, + default_auto_archive_duration = 56, + default_reaction_emoji = dc_rest.models.update_default_reaction_emoji_request.UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 0, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_tags = [ + dc_rest.models.create_or_update_thread_tag_request.CreateOrUpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ] + ) + else: + return CreateGuildRequestChannelItem( + name = '0', + ) + """ + + def testCreateGuildRequestChannelItem(self): + """Test CreateGuildRequestChannelItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_request_role_item.py b/test/test_create_guild_request_role_item.py new file mode 100644 index 0000000..39d4e4f --- /dev/null +++ b/test/test_create_guild_request_role_item.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_request_role_item import CreateGuildRequestRoleItem + +class TestCreateGuildRequestRoleItem(unittest.TestCase): + """CreateGuildRequestRoleItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildRequestRoleItem: + """Test CreateGuildRequestRoleItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildRequestRoleItem` + """ + model = CreateGuildRequestRoleItem() + if include_optional: + return CreateGuildRequestRoleItem( + id = 56, + name = '', + permissions = 56, + color = 0, + hoist = True, + mentionable = True, + unicode_emoji = '' + ) + else: + return CreateGuildRequestRoleItem( + id = 56, + ) + """ + + def testCreateGuildRequestRoleItem(self): + """Test CreateGuildRequestRoleItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_role_request.py b/test/test_create_guild_role_request.py new file mode 100644 index 0000000..9e8288b --- /dev/null +++ b/test/test_create_guild_role_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_role_request import CreateGuildRoleRequest + +class TestCreateGuildRoleRequest(unittest.TestCase): + """CreateGuildRoleRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildRoleRequest: + """Test CreateGuildRoleRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildRoleRequest` + """ + model = CreateGuildRoleRequest() + if include_optional: + return CreateGuildRoleRequest( + name = '', + permissions = 56, + color = 0, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '' + ) + else: + return CreateGuildRoleRequest( + ) + """ + + def testCreateGuildRoleRequest(self): + """Test CreateGuildRoleRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_scheduled_event_request.py b/test/test_create_guild_scheduled_event_request.py new file mode 100644 index 0000000..75da892 --- /dev/null +++ b/test/test_create_guild_scheduled_event_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_scheduled_event_request import CreateGuildScheduledEventRequest + +class TestCreateGuildScheduledEventRequest(unittest.TestCase): + """CreateGuildScheduledEventRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildScheduledEventRequest: + """Test CreateGuildScheduledEventRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildScheduledEventRequest` + """ + model = CreateGuildScheduledEventRequest() + if include_optional: + return CreateGuildScheduledEventRequest( + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return CreateGuildScheduledEventRequest( + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + entity_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testCreateGuildScheduledEventRequest(self): + """Test CreateGuildScheduledEventRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_guild_template_request.py b/test/test_create_guild_template_request.py new file mode 100644 index 0000000..e81eb7f --- /dev/null +++ b/test/test_create_guild_template_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_guild_template_request import CreateGuildTemplateRequest + +class TestCreateGuildTemplateRequest(unittest.TestCase): + """CreateGuildTemplateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateGuildTemplateRequest: + """Test CreateGuildTemplateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateGuildTemplateRequest` + """ + model = CreateGuildTemplateRequest() + if include_optional: + return CreateGuildTemplateRequest( + name = '0', + description = '' + ) + else: + return CreateGuildTemplateRequest( + name = '0', + ) + """ + + def testCreateGuildTemplateRequest(self): + """Test CreateGuildTemplateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_interaction_response_request.py b/test/test_create_interaction_response_request.py new file mode 100644 index 0000000..7e0561f --- /dev/null +++ b/test/test_create_interaction_response_request.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_interaction_response_request import CreateInteractionResponseRequest + +class TestCreateInteractionResponseRequest(unittest.TestCase): + """CreateInteractionResponseRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInteractionResponseRequest: + """Test CreateInteractionResponseRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInteractionResponseRequest` + """ + model = CreateInteractionResponseRequest() + if include_optional: + return CreateInteractionResponseRequest( + type = 56, + data = dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial.IncomingWebhookUpdateForInteractionCallbackRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + flags = 56, ) + ) + else: + return CreateInteractionResponseRequest( + type = 56, + data = dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial.IncomingWebhookUpdateForInteractionCallbackRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + flags = 56, ), + ) + """ + + def testCreateInteractionResponseRequest(self): + """Test CreateInteractionResponseRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_lobby_request.py b/test/test_create_lobby_request.py new file mode 100644 index 0000000..c4ded0d --- /dev/null +++ b/test/test_create_lobby_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_lobby_request import CreateLobbyRequest + +class TestCreateLobbyRequest(unittest.TestCase): + """CreateLobbyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateLobbyRequest: + """Test CreateLobbyRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateLobbyRequest` + """ + model = CreateLobbyRequest() + if include_optional: + return CreateLobbyRequest( + idle_timeout_seconds = 5, + members = [ + dc_rest.models.lobby_member_request.LobbyMemberRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + flags = 1, ) + ], + metadata = { + 'key' : '' + } + ) + else: + return CreateLobbyRequest( + ) + """ + + def testCreateLobbyRequest(self): + """Test CreateLobbyRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_message_interaction_callback_request.py b/test/test_create_message_interaction_callback_request.py new file mode 100644 index 0000000..17d3e26 --- /dev/null +++ b/test/test_create_message_interaction_callback_request.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_message_interaction_callback_request import CreateMessageInteractionCallbackRequest + +class TestCreateMessageInteractionCallbackRequest(unittest.TestCase): + """CreateMessageInteractionCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateMessageInteractionCallbackRequest: + """Test CreateMessageInteractionCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateMessageInteractionCallbackRequest` + """ + model = CreateMessageInteractionCallbackRequest() + if include_optional: + return CreateMessageInteractionCallbackRequest( + type = 56, + data = dc_rest.models.incoming_webhook_interaction_request.IncomingWebhookInteractionRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + tts = True, + flags = 56, ) + ) + else: + return CreateMessageInteractionCallbackRequest( + type = 56, + ) + """ + + def testCreateMessageInteractionCallbackRequest(self): + """Test CreateMessageInteractionCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_message_interaction_callback_response.py b/test/test_create_message_interaction_callback_response.py new file mode 100644 index 0000000..d17d26b --- /dev/null +++ b/test/test_create_message_interaction_callback_response.py @@ -0,0 +1,848 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_message_interaction_callback_response import CreateMessageInteractionCallbackResponse + +class TestCreateMessageInteractionCallbackResponse(unittest.TestCase): + """CreateMessageInteractionCallbackResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateMessageInteractionCallbackResponse: + """Test CreateMessageInteractionCallbackResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateMessageInteractionCallbackResponse` + """ + model = CreateMessageInteractionCallbackResponse() + if include_optional: + return CreateMessageInteractionCallbackResponse( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ) + ) + else: + return CreateMessageInteractionCallbackResponse( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ), + ) + """ + + def testCreateMessageInteractionCallbackResponse(self): + """Test CreateMessageInteractionCallbackResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_or_join_lobby_request.py b/test/test_create_or_join_lobby_request.py new file mode 100644 index 0000000..fe5d6a2 --- /dev/null +++ b/test/test_create_or_join_lobby_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_or_join_lobby_request import CreateOrJoinLobbyRequest + +class TestCreateOrJoinLobbyRequest(unittest.TestCase): + """CreateOrJoinLobbyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrJoinLobbyRequest: + """Test CreateOrJoinLobbyRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateOrJoinLobbyRequest` + """ + model = CreateOrJoinLobbyRequest() + if include_optional: + return CreateOrJoinLobbyRequest( + idle_timeout_seconds = 5, + lobby_metadata = { + 'key' : '' + }, + member_metadata = { + 'key' : '' + }, + secret = '' + ) + else: + return CreateOrJoinLobbyRequest( + secret = '', + ) + """ + + def testCreateOrJoinLobbyRequest(self): + """Test CreateOrJoinLobbyRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_or_update_thread_tag_request.py b/test/test_create_or_update_thread_tag_request.py new file mode 100644 index 0000000..b74f395 --- /dev/null +++ b/test/test_create_or_update_thread_tag_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_or_update_thread_tag_request import CreateOrUpdateThreadTagRequest + +class TestCreateOrUpdateThreadTagRequest(unittest.TestCase): + """CreateOrUpdateThreadTagRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrUpdateThreadTagRequest: + """Test CreateOrUpdateThreadTagRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateOrUpdateThreadTagRequest` + """ + model = CreateOrUpdateThreadTagRequest() + if include_optional: + return CreateOrUpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True + ) + else: + return CreateOrUpdateThreadTagRequest( + name = '', + ) + """ + + def testCreateOrUpdateThreadTagRequest(self): + """Test CreateOrUpdateThreadTagRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_private_channel_request.py b/test/test_create_private_channel_request.py new file mode 100644 index 0000000..63d6ffc --- /dev/null +++ b/test/test_create_private_channel_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_private_channel_request import CreatePrivateChannelRequest + +class TestCreatePrivateChannelRequest(unittest.TestCase): + """CreatePrivateChannelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatePrivateChannelRequest: + """Test CreatePrivateChannelRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatePrivateChannelRequest` + """ + model = CreatePrivateChannelRequest() + if include_optional: + return CreatePrivateChannelRequest( + recipient_id = '9072888001528021798096225500850762068629339333975650685139102691291', + access_tokens = [ + '' + ], + nicks = { + 'key' : '' + } + ) + else: + return CreatePrivateChannelRequest( + ) + """ + + def testCreatePrivateChannelRequest(self): + """Test CreatePrivateChannelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_stage_instance_request.py b/test/test_create_stage_instance_request.py new file mode 100644 index 0000000..9df0365 --- /dev/null +++ b/test/test_create_stage_instance_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_stage_instance_request import CreateStageInstanceRequest + +class TestCreateStageInstanceRequest(unittest.TestCase): + """CreateStageInstanceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateStageInstanceRequest: + """Test CreateStageInstanceRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateStageInstanceRequest` + """ + model = CreateStageInstanceRequest() + if include_optional: + return CreateStageInstanceRequest( + topic = '0', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + privacy_level = 56, + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + send_start_notification = True + ) + else: + return CreateStageInstanceRequest( + topic = '0', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testCreateStageInstanceRequest(self): + """Test CreateStageInstanceRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_text_thread_with_message_request.py b/test/test_create_text_thread_with_message_request.py new file mode 100644 index 0000000..79e4c65 --- /dev/null +++ b/test/test_create_text_thread_with_message_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_text_thread_with_message_request import CreateTextThreadWithMessageRequest + +class TestCreateTextThreadWithMessageRequest(unittest.TestCase): + """CreateTextThreadWithMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTextThreadWithMessageRequest: + """Test CreateTextThreadWithMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTextThreadWithMessageRequest` + """ + model = CreateTextThreadWithMessageRequest() + if include_optional: + return CreateTextThreadWithMessageRequest( + name = '0', + auto_archive_duration = 56, + rate_limit_per_user = 0 + ) + else: + return CreateTextThreadWithMessageRequest( + name = '0', + ) + """ + + def testCreateTextThreadWithMessageRequest(self): + """Test CreateTextThreadWithMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_text_thread_without_message_request.py b/test/test_create_text_thread_without_message_request.py new file mode 100644 index 0000000..94e7cf4 --- /dev/null +++ b/test/test_create_text_thread_without_message_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_text_thread_without_message_request import CreateTextThreadWithoutMessageRequest + +class TestCreateTextThreadWithoutMessageRequest(unittest.TestCase): + """CreateTextThreadWithoutMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTextThreadWithoutMessageRequest: + """Test CreateTextThreadWithoutMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTextThreadWithoutMessageRequest` + """ + model = CreateTextThreadWithoutMessageRequest() + if include_optional: + return CreateTextThreadWithoutMessageRequest( + name = '0', + auto_archive_duration = 56, + rate_limit_per_user = 0, + type = 56, + invitable = True + ) + else: + return CreateTextThreadWithoutMessageRequest( + name = '0', + ) + """ + + def testCreateTextThreadWithoutMessageRequest(self): + """Test CreateTextThreadWithoutMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_thread_request.py b/test/test_create_thread_request.py new file mode 100644 index 0000000..97c2e84 --- /dev/null +++ b/test/test_create_thread_request.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_thread_request import CreateThreadRequest + +class TestCreateThreadRequest(unittest.TestCase): + """CreateThreadRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateThreadRequest: + """Test CreateThreadRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateThreadRequest` + """ + model = CreateThreadRequest() + if include_optional: + return CreateThreadRequest( + name = '0', + auto_archive_duration = 56, + rate_limit_per_user = 0, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + message = dc_rest.models.base_create_message_create_request.BaseCreateMessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), ), + type = 56, + invitable = True + ) + else: + return CreateThreadRequest( + name = '0', + message = dc_rest.models.base_create_message_create_request.BaseCreateMessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), ), + ) + """ + + def testCreateThreadRequest(self): + """Test CreateThreadRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_webhook_request.py b/test/test_create_webhook_request.py new file mode 100644 index 0000000..b8a280a --- /dev/null +++ b/test/test_create_webhook_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.create_webhook_request import CreateWebhookRequest + +class TestCreateWebhookRequest(unittest.TestCase): + """CreateWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateWebhookRequest: + """Test CreateWebhookRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateWebhookRequest` + """ + model = CreateWebhookRequest() + if include_optional: + return CreateWebhookRequest( + name = '0', + avatar = '' + ) + else: + return CreateWebhookRequest( + name = '0', + ) + """ + + def testCreateWebhookRequest(self): + """Test CreateWebhookRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_created_thread_response.py b/test/test_created_thread_response.py new file mode 100644 index 0000000..7da0b86 --- /dev/null +++ b/test/test_created_thread_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.created_thread_response import CreatedThreadResponse + +class TestCreatedThreadResponse(unittest.TestCase): + """CreatedThreadResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatedThreadResponse: + """Test CreatedThreadResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatedThreadResponse` + """ + model = CreatedThreadResponse() + if include_optional: + return CreatedThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ) + ) + else: + return CreatedThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_count = 56, + member_count = 56, + total_message_sent = 56, + ) + """ + + def testCreatedThreadResponse(self): + """Test CreatedThreadResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_api.py b/test/test_default_api.py new file mode 100644 index 0000000..1c6e5aa --- /dev/null +++ b/test/test_default_api.py @@ -0,0 +1,1397 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.api.default_api import DefaultApi + + +class TestDefaultApi(unittest.IsolatedAsyncioTestCase): + """DefaultApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = DefaultApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_add_group_dm_user(self) -> None: + """Test case for add_group_dm_user + + """ + pass + + async def test_add_guild_member(self) -> None: + """Test case for add_guild_member + + """ + pass + + async def test_add_guild_member_role(self) -> None: + """Test case for add_guild_member_role + + """ + pass + + async def test_add_lobby_member(self) -> None: + """Test case for add_lobby_member + + """ + pass + + async def test_add_my_message_reaction(self) -> None: + """Test case for add_my_message_reaction + + """ + pass + + async def test_add_thread_member(self) -> None: + """Test case for add_thread_member + + """ + pass + + async def test_applications_get_activity_instance(self) -> None: + """Test case for applications_get_activity_instance + + """ + pass + + async def test_ban_user_from_guild(self) -> None: + """Test case for ban_user_from_guild + + """ + pass + + async def test_bulk_ban_users_from_guild(self) -> None: + """Test case for bulk_ban_users_from_guild + + """ + pass + + async def test_bulk_delete_messages(self) -> None: + """Test case for bulk_delete_messages + + """ + pass + + async def test_bulk_set_application_commands(self) -> None: + """Test case for bulk_set_application_commands + + """ + pass + + async def test_bulk_set_guild_application_commands(self) -> None: + """Test case for bulk_set_guild_application_commands + + """ + pass + + async def test_bulk_update_guild_channels(self) -> None: + """Test case for bulk_update_guild_channels + + """ + pass + + async def test_bulk_update_guild_roles(self) -> None: + """Test case for bulk_update_guild_roles + + """ + pass + + async def test_bulk_update_lobby_members(self) -> None: + """Test case for bulk_update_lobby_members + + """ + pass + + async def test_consume_entitlement(self) -> None: + """Test case for consume_entitlement + + """ + pass + + async def test_create_application_command(self) -> None: + """Test case for create_application_command + + """ + pass + + async def test_create_application_emoji(self) -> None: + """Test case for create_application_emoji + + """ + pass + + async def test_create_auto_moderation_rule(self) -> None: + """Test case for create_auto_moderation_rule + + """ + pass + + async def test_create_channel_invite(self) -> None: + """Test case for create_channel_invite + + """ + pass + + async def test_create_dm(self) -> None: + """Test case for create_dm + + """ + pass + + async def test_create_entitlement(self) -> None: + """Test case for create_entitlement + + """ + pass + + async def test_create_guild(self) -> None: + """Test case for create_guild + + """ + pass + + async def test_create_guild_application_command(self) -> None: + """Test case for create_guild_application_command + + """ + pass + + async def test_create_guild_channel(self) -> None: + """Test case for create_guild_channel + + """ + pass + + async def test_create_guild_emoji(self) -> None: + """Test case for create_guild_emoji + + """ + pass + + async def test_create_guild_from_template(self) -> None: + """Test case for create_guild_from_template + + """ + pass + + async def test_create_guild_role(self) -> None: + """Test case for create_guild_role + + """ + pass + + async def test_create_guild_scheduled_event(self) -> None: + """Test case for create_guild_scheduled_event + + """ + pass + + async def test_create_guild_soundboard_sound(self) -> None: + """Test case for create_guild_soundboard_sound + + """ + pass + + async def test_create_guild_sticker(self) -> None: + """Test case for create_guild_sticker + + """ + pass + + async def test_create_guild_template(self) -> None: + """Test case for create_guild_template + + """ + pass + + async def test_create_interaction_response(self) -> None: + """Test case for create_interaction_response + + """ + pass + + async def test_create_lobby(self) -> None: + """Test case for create_lobby + + """ + pass + + async def test_create_lobby_message(self) -> None: + """Test case for create_lobby_message + + """ + pass + + async def test_create_message(self) -> None: + """Test case for create_message + + """ + pass + + async def test_create_or_join_lobby(self) -> None: + """Test case for create_or_join_lobby + + """ + pass + + async def test_create_pin(self) -> None: + """Test case for create_pin + + """ + pass + + async def test_create_stage_instance(self) -> None: + """Test case for create_stage_instance + + """ + pass + + async def test_create_thread(self) -> None: + """Test case for create_thread + + """ + pass + + async def test_create_thread_from_message(self) -> None: + """Test case for create_thread_from_message + + """ + pass + + async def test_create_webhook(self) -> None: + """Test case for create_webhook + + """ + pass + + async def test_crosspost_message(self) -> None: + """Test case for crosspost_message + + """ + pass + + async def test_delete_all_message_reactions(self) -> None: + """Test case for delete_all_message_reactions + + """ + pass + + async def test_delete_all_message_reactions_by_emoji(self) -> None: + """Test case for delete_all_message_reactions_by_emoji + + """ + pass + + async def test_delete_application_command(self) -> None: + """Test case for delete_application_command + + """ + pass + + async def test_delete_application_emoji(self) -> None: + """Test case for delete_application_emoji + + """ + pass + + async def test_delete_application_user_role_connection(self) -> None: + """Test case for delete_application_user_role_connection + + """ + pass + + async def test_delete_auto_moderation_rule(self) -> None: + """Test case for delete_auto_moderation_rule + + """ + pass + + async def test_delete_channel(self) -> None: + """Test case for delete_channel + + """ + pass + + async def test_delete_channel_permission_overwrite(self) -> None: + """Test case for delete_channel_permission_overwrite + + """ + pass + + async def test_delete_entitlement(self) -> None: + """Test case for delete_entitlement + + """ + pass + + async def test_delete_group_dm_user(self) -> None: + """Test case for delete_group_dm_user + + """ + pass + + async def test_delete_guild(self) -> None: + """Test case for delete_guild + + """ + pass + + async def test_delete_guild_application_command(self) -> None: + """Test case for delete_guild_application_command + + """ + pass + + async def test_delete_guild_emoji(self) -> None: + """Test case for delete_guild_emoji + + """ + pass + + async def test_delete_guild_integration(self) -> None: + """Test case for delete_guild_integration + + """ + pass + + async def test_delete_guild_member(self) -> None: + """Test case for delete_guild_member + + """ + pass + + async def test_delete_guild_member_role(self) -> None: + """Test case for delete_guild_member_role + + """ + pass + + async def test_delete_guild_role(self) -> None: + """Test case for delete_guild_role + + """ + pass + + async def test_delete_guild_scheduled_event(self) -> None: + """Test case for delete_guild_scheduled_event + + """ + pass + + async def test_delete_guild_soundboard_sound(self) -> None: + """Test case for delete_guild_soundboard_sound + + """ + pass + + async def test_delete_guild_sticker(self) -> None: + """Test case for delete_guild_sticker + + """ + pass + + async def test_delete_guild_template(self) -> None: + """Test case for delete_guild_template + + """ + pass + + async def test_delete_lobby_member(self) -> None: + """Test case for delete_lobby_member + + """ + pass + + async def test_delete_message(self) -> None: + """Test case for delete_message + + """ + pass + + async def test_delete_my_message_reaction(self) -> None: + """Test case for delete_my_message_reaction + + """ + pass + + async def test_delete_original_webhook_message(self) -> None: + """Test case for delete_original_webhook_message + + """ + pass + + async def test_delete_pin(self) -> None: + """Test case for delete_pin + + """ + pass + + async def test_delete_stage_instance(self) -> None: + """Test case for delete_stage_instance + + """ + pass + + async def test_delete_thread_member(self) -> None: + """Test case for delete_thread_member + + """ + pass + + async def test_delete_user_message_reaction(self) -> None: + """Test case for delete_user_message_reaction + + """ + pass + + async def test_delete_webhook(self) -> None: + """Test case for delete_webhook + + """ + pass + + async def test_delete_webhook_by_token(self) -> None: + """Test case for delete_webhook_by_token + + """ + pass + + async def test_delete_webhook_message(self) -> None: + """Test case for delete_webhook_message + + """ + pass + + async def test_deprecated_create_pin(self) -> None: + """Test case for deprecated_create_pin + + """ + pass + + async def test_deprecated_delete_pin(self) -> None: + """Test case for deprecated_delete_pin + + """ + pass + + async def test_deprecated_list_pins(self) -> None: + """Test case for deprecated_list_pins + + """ + pass + + async def test_edit_lobby(self) -> None: + """Test case for edit_lobby + + """ + pass + + async def test_edit_lobby_channel_link(self) -> None: + """Test case for edit_lobby_channel_link + + """ + pass + + async def test_execute_github_compatible_webhook(self) -> None: + """Test case for execute_github_compatible_webhook + + """ + pass + + async def test_execute_slack_compatible_webhook(self) -> None: + """Test case for execute_slack_compatible_webhook + + """ + pass + + async def test_execute_webhook(self) -> None: + """Test case for execute_webhook + + """ + pass + + async def test_follow_channel(self) -> None: + """Test case for follow_channel + + """ + pass + + async def test_get_active_guild_threads(self) -> None: + """Test case for get_active_guild_threads + + """ + pass + + async def test_get_answer_voters(self) -> None: + """Test case for get_answer_voters + + """ + pass + + async def test_get_application(self) -> None: + """Test case for get_application + + """ + pass + + async def test_get_application_command(self) -> None: + """Test case for get_application_command + + """ + pass + + async def test_get_application_emoji(self) -> None: + """Test case for get_application_emoji + + """ + pass + + async def test_get_application_role_connections_metadata(self) -> None: + """Test case for get_application_role_connections_metadata + + """ + pass + + async def test_get_application_user_role_connection(self) -> None: + """Test case for get_application_user_role_connection + + """ + pass + + async def test_get_auto_moderation_rule(self) -> None: + """Test case for get_auto_moderation_rule + + """ + pass + + async def test_get_bot_gateway(self) -> None: + """Test case for get_bot_gateway + + """ + pass + + async def test_get_channel(self) -> None: + """Test case for get_channel + + """ + pass + + async def test_get_entitlement(self) -> None: + """Test case for get_entitlement + + """ + pass + + async def test_get_entitlements(self) -> None: + """Test case for get_entitlements + + """ + pass + + async def test_get_gateway(self) -> None: + """Test case for get_gateway + + """ + pass + + async def test_get_guild(self) -> None: + """Test case for get_guild + + """ + pass + + async def test_get_guild_application_command(self) -> None: + """Test case for get_guild_application_command + + """ + pass + + async def test_get_guild_application_command_permissions(self) -> None: + """Test case for get_guild_application_command_permissions + + """ + pass + + async def test_get_guild_ban(self) -> None: + """Test case for get_guild_ban + + """ + pass + + async def test_get_guild_emoji(self) -> None: + """Test case for get_guild_emoji + + """ + pass + + async def test_get_guild_member(self) -> None: + """Test case for get_guild_member + + """ + pass + + async def test_get_guild_new_member_welcome(self) -> None: + """Test case for get_guild_new_member_welcome + + """ + pass + + async def test_get_guild_preview(self) -> None: + """Test case for get_guild_preview + + """ + pass + + async def test_get_guild_role(self) -> None: + """Test case for get_guild_role + + """ + pass + + async def test_get_guild_scheduled_event(self) -> None: + """Test case for get_guild_scheduled_event + + """ + pass + + async def test_get_guild_soundboard_sound(self) -> None: + """Test case for get_guild_soundboard_sound + + """ + pass + + async def test_get_guild_sticker(self) -> None: + """Test case for get_guild_sticker + + """ + pass + + async def test_get_guild_template(self) -> None: + """Test case for get_guild_template + + """ + pass + + async def test_get_guild_vanity_url(self) -> None: + """Test case for get_guild_vanity_url + + """ + pass + + async def test_get_guild_webhooks(self) -> None: + """Test case for get_guild_webhooks + + """ + pass + + async def test_get_guild_welcome_screen(self) -> None: + """Test case for get_guild_welcome_screen + + """ + pass + + async def test_get_guild_widget(self) -> None: + """Test case for get_guild_widget + + """ + pass + + async def test_get_guild_widget_png(self) -> None: + """Test case for get_guild_widget_png + + """ + pass + + async def test_get_guild_widget_settings(self) -> None: + """Test case for get_guild_widget_settings + + """ + pass + + async def test_get_guilds_onboarding(self) -> None: + """Test case for get_guilds_onboarding + + """ + pass + + async def test_get_lobby(self) -> None: + """Test case for get_lobby + + """ + pass + + async def test_get_lobby_messages(self) -> None: + """Test case for get_lobby_messages + + """ + pass + + async def test_get_message(self) -> None: + """Test case for get_message + + """ + pass + + async def test_get_my_application(self) -> None: + """Test case for get_my_application + + """ + pass + + async def test_get_my_guild_member(self) -> None: + """Test case for get_my_guild_member + + """ + pass + + async def test_get_my_oauth2_application(self) -> None: + """Test case for get_my_oauth2_application + + """ + pass + + async def test_get_my_oauth2_authorization(self) -> None: + """Test case for get_my_oauth2_authorization + + """ + pass + + async def test_get_my_user(self) -> None: + """Test case for get_my_user + + """ + pass + + async def test_get_openid_connect_userinfo(self) -> None: + """Test case for get_openid_connect_userinfo + + """ + pass + + async def test_get_original_webhook_message(self) -> None: + """Test case for get_original_webhook_message + + """ + pass + + async def test_get_public_keys(self) -> None: + """Test case for get_public_keys + + """ + pass + + async def test_get_self_voice_state(self) -> None: + """Test case for get_self_voice_state + + """ + pass + + async def test_get_soundboard_default_sounds(self) -> None: + """Test case for get_soundboard_default_sounds + + """ + pass + + async def test_get_stage_instance(self) -> None: + """Test case for get_stage_instance + + """ + pass + + async def test_get_sticker(self) -> None: + """Test case for get_sticker + + """ + pass + + async def test_get_sticker_pack(self) -> None: + """Test case for get_sticker_pack + + """ + pass + + async def test_get_thread_member(self) -> None: + """Test case for get_thread_member + + """ + pass + + async def test_get_user(self) -> None: + """Test case for get_user + + """ + pass + + async def test_get_voice_state(self) -> None: + """Test case for get_voice_state + + """ + pass + + async def test_get_webhook(self) -> None: + """Test case for get_webhook + + """ + pass + + async def test_get_webhook_by_token(self) -> None: + """Test case for get_webhook_by_token + + """ + pass + + async def test_get_webhook_message(self) -> None: + """Test case for get_webhook_message + + """ + pass + + async def test_invite_resolve(self) -> None: + """Test case for invite_resolve + + """ + pass + + async def test_invite_revoke(self) -> None: + """Test case for invite_revoke + + """ + pass + + async def test_join_thread(self) -> None: + """Test case for join_thread + + """ + pass + + async def test_leave_guild(self) -> None: + """Test case for leave_guild + + """ + pass + + async def test_leave_lobby(self) -> None: + """Test case for leave_lobby + + """ + pass + + async def test_leave_thread(self) -> None: + """Test case for leave_thread + + """ + pass + + async def test_list_application_commands(self) -> None: + """Test case for list_application_commands + + """ + pass + + async def test_list_application_emojis(self) -> None: + """Test case for list_application_emojis + + """ + pass + + async def test_list_auto_moderation_rules(self) -> None: + """Test case for list_auto_moderation_rules + + """ + pass + + async def test_list_channel_invites(self) -> None: + """Test case for list_channel_invites + + """ + pass + + async def test_list_channel_webhooks(self) -> None: + """Test case for list_channel_webhooks + + """ + pass + + async def test_list_guild_application_command_permissions(self) -> None: + """Test case for list_guild_application_command_permissions + + """ + pass + + async def test_list_guild_application_commands(self) -> None: + """Test case for list_guild_application_commands + + """ + pass + + async def test_list_guild_audit_log_entries(self) -> None: + """Test case for list_guild_audit_log_entries + + """ + pass + + async def test_list_guild_bans(self) -> None: + """Test case for list_guild_bans + + """ + pass + + async def test_list_guild_channels(self) -> None: + """Test case for list_guild_channels + + """ + pass + + async def test_list_guild_emojis(self) -> None: + """Test case for list_guild_emojis + + """ + pass + + async def test_list_guild_integrations(self) -> None: + """Test case for list_guild_integrations + + """ + pass + + async def test_list_guild_invites(self) -> None: + """Test case for list_guild_invites + + """ + pass + + async def test_list_guild_members(self) -> None: + """Test case for list_guild_members + + """ + pass + + async def test_list_guild_roles(self) -> None: + """Test case for list_guild_roles + + """ + pass + + async def test_list_guild_scheduled_event_users(self) -> None: + """Test case for list_guild_scheduled_event_users + + """ + pass + + async def test_list_guild_scheduled_events(self) -> None: + """Test case for list_guild_scheduled_events + + """ + pass + + async def test_list_guild_soundboard_sounds(self) -> None: + """Test case for list_guild_soundboard_sounds + + """ + pass + + async def test_list_guild_stickers(self) -> None: + """Test case for list_guild_stickers + + """ + pass + + async def test_list_guild_templates(self) -> None: + """Test case for list_guild_templates + + """ + pass + + async def test_list_guild_voice_regions(self) -> None: + """Test case for list_guild_voice_regions + + """ + pass + + async def test_list_message_reactions_by_emoji(self) -> None: + """Test case for list_message_reactions_by_emoji + + """ + pass + + async def test_list_messages(self) -> None: + """Test case for list_messages + + """ + pass + + async def test_list_my_connections(self) -> None: + """Test case for list_my_connections + + """ + pass + + async def test_list_my_guilds(self) -> None: + """Test case for list_my_guilds + + """ + pass + + async def test_list_my_private_archived_threads(self) -> None: + """Test case for list_my_private_archived_threads + + """ + pass + + async def test_list_pins(self) -> None: + """Test case for list_pins + + """ + pass + + async def test_list_private_archived_threads(self) -> None: + """Test case for list_private_archived_threads + + """ + pass + + async def test_list_public_archived_threads(self) -> None: + """Test case for list_public_archived_threads + + """ + pass + + async def test_list_sticker_packs(self) -> None: + """Test case for list_sticker_packs + + """ + pass + + async def test_list_thread_members(self) -> None: + """Test case for list_thread_members + + """ + pass + + async def test_list_voice_regions(self) -> None: + """Test case for list_voice_regions + + """ + pass + + async def test_partner_sdk_token(self) -> None: + """Test case for partner_sdk_token + + """ + pass + + async def test_partner_sdk_unmerge_provisional_account(self) -> None: + """Test case for partner_sdk_unmerge_provisional_account + + """ + pass + + async def test_poll_expire(self) -> None: + """Test case for poll_expire + + """ + pass + + async def test_preview_prune_guild(self) -> None: + """Test case for preview_prune_guild + + """ + pass + + async def test_prune_guild(self) -> None: + """Test case for prune_guild + + """ + pass + + async def test_put_guilds_onboarding(self) -> None: + """Test case for put_guilds_onboarding + + """ + pass + + async def test_search_guild_members(self) -> None: + """Test case for search_guild_members + + """ + pass + + async def test_send_soundboard_sound(self) -> None: + """Test case for send_soundboard_sound + + """ + pass + + async def test_set_channel_permission_overwrite(self) -> None: + """Test case for set_channel_permission_overwrite + + """ + pass + + async def test_set_guild_application_command_permissions(self) -> None: + """Test case for set_guild_application_command_permissions + + """ + pass + + async def test_set_guild_mfa_level(self) -> None: + """Test case for set_guild_mfa_level + + """ + pass + + async def test_sync_guild_template(self) -> None: + """Test case for sync_guild_template + + """ + pass + + async def test_thread_search(self) -> None: + """Test case for thread_search + + """ + pass + + async def test_trigger_typing_indicator(self) -> None: + """Test case for trigger_typing_indicator + + """ + pass + + async def test_unban_user_from_guild(self) -> None: + """Test case for unban_user_from_guild + + """ + pass + + async def test_update_application(self) -> None: + """Test case for update_application + + """ + pass + + async def test_update_application_command(self) -> None: + """Test case for update_application_command + + """ + pass + + async def test_update_application_emoji(self) -> None: + """Test case for update_application_emoji + + """ + pass + + async def test_update_application_role_connections_metadata(self) -> None: + """Test case for update_application_role_connections_metadata + + """ + pass + + async def test_update_application_user_role_connection(self) -> None: + """Test case for update_application_user_role_connection + + """ + pass + + async def test_update_auto_moderation_rule(self) -> None: + """Test case for update_auto_moderation_rule + + """ + pass + + async def test_update_channel(self) -> None: + """Test case for update_channel + + """ + pass + + async def test_update_guild(self) -> None: + """Test case for update_guild + + """ + pass + + async def test_update_guild_application_command(self) -> None: + """Test case for update_guild_application_command + + """ + pass + + async def test_update_guild_emoji(self) -> None: + """Test case for update_guild_emoji + + """ + pass + + async def test_update_guild_member(self) -> None: + """Test case for update_guild_member + + """ + pass + + async def test_update_guild_role(self) -> None: + """Test case for update_guild_role + + """ + pass + + async def test_update_guild_scheduled_event(self) -> None: + """Test case for update_guild_scheduled_event + + """ + pass + + async def test_update_guild_soundboard_sound(self) -> None: + """Test case for update_guild_soundboard_sound + + """ + pass + + async def test_update_guild_sticker(self) -> None: + """Test case for update_guild_sticker + + """ + pass + + async def test_update_guild_template(self) -> None: + """Test case for update_guild_template + + """ + pass + + async def test_update_guild_welcome_screen(self) -> None: + """Test case for update_guild_welcome_screen + + """ + pass + + async def test_update_guild_widget_settings(self) -> None: + """Test case for update_guild_widget_settings + + """ + pass + + async def test_update_message(self) -> None: + """Test case for update_message + + """ + pass + + async def test_update_my_application(self) -> None: + """Test case for update_my_application + + """ + pass + + async def test_update_my_guild_member(self) -> None: + """Test case for update_my_guild_member + + """ + pass + + async def test_update_my_user(self) -> None: + """Test case for update_my_user + + """ + pass + + async def test_update_original_webhook_message(self) -> None: + """Test case for update_original_webhook_message + + """ + pass + + async def test_update_self_voice_state(self) -> None: + """Test case for update_self_voice_state + + """ + pass + + async def test_update_stage_instance(self) -> None: + """Test case for update_stage_instance + + """ + pass + + async def test_update_voice_state(self) -> None: + """Test case for update_voice_state + + """ + pass + + async def test_update_webhook(self) -> None: + """Test case for update_webhook + + """ + pass + + async def test_update_webhook_by_token(self) -> None: + """Test case for update_webhook_by_token + + """ + pass + + async def test_update_webhook_message(self) -> None: + """Test case for update_webhook_message + + """ + pass + + async def test_upload_application_attachment(self) -> None: + """Test case for upload_application_attachment + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_list_trigger_metadata.py b/test/test_default_keyword_list_trigger_metadata.py new file mode 100644 index 0000000..9f3d612 --- /dev/null +++ b/test/test_default_keyword_list_trigger_metadata.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_list_trigger_metadata import DefaultKeywordListTriggerMetadata + +class TestDefaultKeywordListTriggerMetadata(unittest.TestCase): + """DefaultKeywordListTriggerMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordListTriggerMetadata: + """Test DefaultKeywordListTriggerMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordListTriggerMetadata` + """ + model = DefaultKeywordListTriggerMetadata() + if include_optional: + return DefaultKeywordListTriggerMetadata( + allow_list = [ + '0' + ], + presets = [ + 56 + ] + ) + else: + return DefaultKeywordListTriggerMetadata( + ) + """ + + def testDefaultKeywordListTriggerMetadata(self): + """Test DefaultKeywordListTriggerMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_list_trigger_metadata_response.py b/test/test_default_keyword_list_trigger_metadata_response.py new file mode 100644 index 0000000..9241d49 --- /dev/null +++ b/test/test_default_keyword_list_trigger_metadata_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_list_trigger_metadata_response import DefaultKeywordListTriggerMetadataResponse + +class TestDefaultKeywordListTriggerMetadataResponse(unittest.TestCase): + """DefaultKeywordListTriggerMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordListTriggerMetadataResponse: + """Test DefaultKeywordListTriggerMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordListTriggerMetadataResponse` + """ + model = DefaultKeywordListTriggerMetadataResponse() + if include_optional: + return DefaultKeywordListTriggerMetadataResponse( + allow_list = [ + '' + ], + presets = [ + 56 + ] + ) + else: + return DefaultKeywordListTriggerMetadataResponse( + allow_list = [ + '' + ], + presets = [ + 56 + ], + ) + """ + + def testDefaultKeywordListTriggerMetadataResponse(self): + """Test DefaultKeywordListTriggerMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_list_upsert_request.py b/test/test_default_keyword_list_upsert_request.py new file mode 100644 index 0000000..e652b1e --- /dev/null +++ b/test/test_default_keyword_list_upsert_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_list_upsert_request import DefaultKeywordListUpsertRequest + +class TestDefaultKeywordListUpsertRequest(unittest.TestCase): + """DefaultKeywordListUpsertRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordListUpsertRequest: + """Test DefaultKeywordListUpsertRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordListUpsertRequest` + """ + model = DefaultKeywordListUpsertRequest() + if include_optional: + return DefaultKeywordListUpsertRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.default_keyword_list_trigger_metadata.DefaultKeywordListTriggerMetadata( + allow_list = [ + '0' + ], + presets = [ + 56 + ], ) + ) + else: + return DefaultKeywordListUpsertRequest( + name = '', + event_type = 56, + trigger_type = 56, + trigger_metadata = dc_rest.models.default_keyword_list_trigger_metadata.DefaultKeywordListTriggerMetadata( + allow_list = [ + '0' + ], + presets = [ + 56 + ], ), + ) + """ + + def testDefaultKeywordListUpsertRequest(self): + """Test DefaultKeywordListUpsertRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_list_upsert_request_actions_inner.py b/test/test_default_keyword_list_upsert_request_actions_inner.py new file mode 100644 index 0000000..4d664d3 --- /dev/null +++ b/test/test_default_keyword_list_upsert_request_actions_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_list_upsert_request_actions_inner import DefaultKeywordListUpsertRequestActionsInner + +class TestDefaultKeywordListUpsertRequestActionsInner(unittest.TestCase): + """DefaultKeywordListUpsertRequestActionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordListUpsertRequestActionsInner: + """Test DefaultKeywordListUpsertRequestActionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordListUpsertRequestActionsInner` + """ + model = DefaultKeywordListUpsertRequestActionsInner() + if include_optional: + return DefaultKeywordListUpsertRequestActionsInner( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata.UserCommunicationDisabledActionMetadata( + duration_seconds = 0, ) + ) + else: + return DefaultKeywordListUpsertRequestActionsInner( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata.UserCommunicationDisabledActionMetadata( + duration_seconds = 0, ), + ) + """ + + def testDefaultKeywordListUpsertRequestActionsInner(self): + """Test DefaultKeywordListUpsertRequestActionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_list_upsert_request_partial.py b/test/test_default_keyword_list_upsert_request_partial.py new file mode 100644 index 0000000..8da68c3 --- /dev/null +++ b/test/test_default_keyword_list_upsert_request_partial.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_list_upsert_request_partial import DefaultKeywordListUpsertRequestPartial + +class TestDefaultKeywordListUpsertRequestPartial(unittest.TestCase): + """DefaultKeywordListUpsertRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordListUpsertRequestPartial: + """Test DefaultKeywordListUpsertRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordListUpsertRequestPartial` + """ + model = DefaultKeywordListUpsertRequestPartial() + if include_optional: + return DefaultKeywordListUpsertRequestPartial( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.default_keyword_list_trigger_metadata.DefaultKeywordListTriggerMetadata( + allow_list = [ + '0' + ], + presets = [ + 56 + ], ) + ) + else: + return DefaultKeywordListUpsertRequestPartial( + ) + """ + + def testDefaultKeywordListUpsertRequestPartial(self): + """Test DefaultKeywordListUpsertRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_rule_response.py b/test/test_default_keyword_rule_response.py new file mode 100644 index 0000000..89bc987 --- /dev/null +++ b/test/test_default_keyword_rule_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_rule_response import DefaultKeywordRuleResponse + +class TestDefaultKeywordRuleResponse(unittest.TestCase): + """DefaultKeywordRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordRuleResponse: + """Test DefaultKeywordRuleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordRuleResponse` + """ + model = DefaultKeywordRuleResponse() + if include_optional: + return DefaultKeywordRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.default_keyword_list_trigger_metadata_response.DefaultKeywordListTriggerMetadataResponse( + allow_list = [ + '' + ], + presets = [ + 56 + ], ) + ) + else: + return DefaultKeywordRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.default_keyword_list_trigger_metadata_response.DefaultKeywordListTriggerMetadataResponse( + allow_list = [ + '' + ], + presets = [ + 56 + ], ), + ) + """ + + def testDefaultKeywordRuleResponse(self): + """Test DefaultKeywordRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_keyword_rule_response_actions_inner.py b/test/test_default_keyword_rule_response_actions_inner.py new file mode 100644 index 0000000..405b606 --- /dev/null +++ b/test/test_default_keyword_rule_response_actions_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_keyword_rule_response_actions_inner import DefaultKeywordRuleResponseActionsInner + +class TestDefaultKeywordRuleResponseActionsInner(unittest.TestCase): + """DefaultKeywordRuleResponseActionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultKeywordRuleResponseActionsInner: + """Test DefaultKeywordRuleResponseActionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultKeywordRuleResponseActionsInner` + """ + model = DefaultKeywordRuleResponseActionsInner() + if include_optional: + return DefaultKeywordRuleResponseActionsInner( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata_response.UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56, ) + ) + else: + return DefaultKeywordRuleResponseActionsInner( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata_response.UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56, ), + ) + """ + + def testDefaultKeywordRuleResponseActionsInner(self): + """Test DefaultKeywordRuleResponseActionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_reaction_emoji_response.py b/test/test_default_reaction_emoji_response.py new file mode 100644 index 0000000..3406eba --- /dev/null +++ b/test/test_default_reaction_emoji_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.default_reaction_emoji_response import DefaultReactionEmojiResponse + +class TestDefaultReactionEmojiResponse(unittest.TestCase): + """DefaultReactionEmojiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultReactionEmojiResponse: + """Test DefaultReactionEmojiResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultReactionEmojiResponse` + """ + model = DefaultReactionEmojiResponse() + if include_optional: + return DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '' + ) + else: + return DefaultReactionEmojiResponse( + ) + """ + + def testDefaultReactionEmojiResponse(self): + """Test DefaultReactionEmojiResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_discord_integration_response.py b/test/test_discord_integration_response.py new file mode 100644 index 0000000..050afb8 --- /dev/null +++ b/test/test_discord_integration_response.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.discord_integration_response import DiscordIntegrationResponse + +class TestDiscordIntegrationResponse(unittest.TestCase): + """DiscordIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DiscordIntegrationResponse: + """Test DiscordIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DiscordIntegrationResponse` + """ + model = DiscordIntegrationResponse() + if include_optional: + return DiscordIntegrationResponse( + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + enabled = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + scopes = [ + 'applications.commands' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return DiscordIntegrationResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + scopes = [ + 'applications.commands' + ], + ) + """ + + def testDiscordIntegrationResponse(self): + """Test DiscordIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_lobby_channel_link_request.py b/test/test_edit_lobby_channel_link_request.py new file mode 100644 index 0000000..309aa29 --- /dev/null +++ b/test/test_edit_lobby_channel_link_request.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.edit_lobby_channel_link_request import EditLobbyChannelLinkRequest + +class TestEditLobbyChannelLinkRequest(unittest.TestCase): + """EditLobbyChannelLinkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditLobbyChannelLinkRequest: + """Test EditLobbyChannelLinkRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditLobbyChannelLinkRequest` + """ + model = EditLobbyChannelLinkRequest() + if include_optional: + return EditLobbyChannelLinkRequest( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return EditLobbyChannelLinkRequest( + ) + """ + + def testEditLobbyChannelLinkRequest(self): + """Test EditLobbyChannelLinkRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_embedded_activity_instance.py b/test/test_embedded_activity_instance.py new file mode 100644 index 0000000..46234ab --- /dev/null +++ b/test/test_embedded_activity_instance.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.embedded_activity_instance import EmbeddedActivityInstance + +class TestEmbeddedActivityInstance(unittest.TestCase): + """EmbeddedActivityInstance unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmbeddedActivityInstance: + """Test EmbeddedActivityInstance + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmbeddedActivityInstance` + """ + model = EmbeddedActivityInstance() + if include_optional: + return EmbeddedActivityInstance( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + instance_id = '', + launch_id = '', + location = None, + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return EmbeddedActivityInstance( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + instance_id = '', + launch_id = '', + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testEmbeddedActivityInstance(self): + """Test EmbeddedActivityInstance""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_embedded_activity_instance_location.py b/test/test_embedded_activity_instance_location.py new file mode 100644 index 0000000..0027bcf --- /dev/null +++ b/test/test_embedded_activity_instance_location.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.embedded_activity_instance_location import EmbeddedActivityInstanceLocation + +class TestEmbeddedActivityInstanceLocation(unittest.TestCase): + """EmbeddedActivityInstanceLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmbeddedActivityInstanceLocation: + """Test EmbeddedActivityInstanceLocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmbeddedActivityInstanceLocation` + """ + model = EmbeddedActivityInstanceLocation() + if include_optional: + return EmbeddedActivityInstanceLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return EmbeddedActivityInstanceLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testEmbeddedActivityInstanceLocation(self): + """Test EmbeddedActivityInstanceLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_emoji_response.py b/test/test_emoji_response.py new file mode 100644 index 0000000..69bf488 --- /dev/null +++ b/test/test_emoji_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.emoji_response import EmojiResponse + +class TestEmojiResponse(unittest.TestCase): + """EmojiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmojiResponse: + """Test EmojiResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmojiResponse` + """ + model = EmojiResponse() + if include_optional: + return EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True + ) + else: + return EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, + ) + """ + + def testEmojiResponse(self): + """Test EmojiResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entitlement_response.py b/test/test_entitlement_response.py new file mode 100644 index 0000000..e258888 --- /dev/null +++ b/test/test_entitlement_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.entitlement_response import EntitlementResponse + +class TestEntitlementResponse(unittest.TestCase): + """EntitlementResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntitlementResponse: + """Test EntitlementResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntitlementResponse` + """ + model = EntitlementResponse() + if include_optional: + return EntitlementResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + deleted = True, + starts_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ends_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + type = 56, + fulfilled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fulfillment_status = 56, + consumed = True + ) + else: + return EntitlementResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + deleted = True, + type = 56, + ) + """ + + def testEntitlementResponse(self): + """Test EntitlementResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entity_metadata_external.py b/test/test_entity_metadata_external.py new file mode 100644 index 0000000..6399ad0 --- /dev/null +++ b/test/test_entity_metadata_external.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.entity_metadata_external import EntityMetadataExternal + +class TestEntityMetadataExternal(unittest.TestCase): + """EntityMetadataExternal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntityMetadataExternal: + """Test EntityMetadataExternal + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntityMetadataExternal` + """ + model = EntityMetadataExternal() + if include_optional: + return EntityMetadataExternal( + location = '' + ) + else: + return EntityMetadataExternal( + location = '', + ) + """ + + def testEntityMetadataExternal(self): + """Test EntityMetadataExternal""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entity_metadata_external_response.py b/test/test_entity_metadata_external_response.py new file mode 100644 index 0000000..9ac9e3c --- /dev/null +++ b/test/test_entity_metadata_external_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.entity_metadata_external_response import EntityMetadataExternalResponse + +class TestEntityMetadataExternalResponse(unittest.TestCase): + """EntityMetadataExternalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntityMetadataExternalResponse: + """Test EntityMetadataExternalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntityMetadataExternalResponse` + """ + model = EntityMetadataExternalResponse() + if include_optional: + return EntityMetadataExternalResponse( + location = '' + ) + else: + return EntityMetadataExternalResponse( + location = '', + ) + """ + + def testEntityMetadataExternalResponse(self): + """Test EntityMetadataExternalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error.py b/test/test_error.py new file mode 100644 index 0000000..1ad73a7 --- /dev/null +++ b/test/test_error.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + code = 56, + message = '' + ) + else: + return Error( + code = 56, + message = '', + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error_details.py b/test/test_error_details.py new file mode 100644 index 0000000..91a0157 --- /dev/null +++ b/test/test_error_details.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.error_details import ErrorDetails + +class TestErrorDetails(unittest.TestCase): + """ErrorDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ErrorDetails: + """Test ErrorDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorDetails` + """ + model = ErrorDetails() + if include_optional: + return ErrorDetails( + errors = [ + dc_rest.models.error.Error( + code = 56, + message = '', ) + ] + ) + else: + return ErrorDetails( + errors = [ + dc_rest.models.error.Error( + code = 56, + message = '', ) + ], + ) + """ + + def testErrorDetails(self): + """Test ErrorDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error_response.py b/test/test_error_response.py new file mode 100644 index 0000000..6cbcbb0 --- /dev/null +++ b/test/test_error_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.error_response import ErrorResponse + +class TestErrorResponse(unittest.TestCase): + """ErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ErrorResponse: + """Test ErrorResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorResponse` + """ + model = ErrorResponse() + if include_optional: + return ErrorResponse( + code = 56, + message = '', + errors = None + ) + else: + return ErrorResponse( + code = 56, + message = '', + ) + """ + + def testErrorResponse(self): + """Test ErrorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_execute_webhook_request.py b/test/test_execute_webhook_request.py new file mode 100644 index 0000000..78dbf5e --- /dev/null +++ b/test/test_execute_webhook_request.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.execute_webhook_request import ExecuteWebhookRequest + +class TestExecuteWebhookRequest(unittest.TestCase): + """ExecuteWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExecuteWebhookRequest: + """Test ExecuteWebhookRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExecuteWebhookRequest` + """ + model = ExecuteWebhookRequest() + if include_optional: + return ExecuteWebhookRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + tts = True, + flags = 56, + username = '0', + avatar_url = '', + thread_name = '', + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return ExecuteWebhookRequest( + ) + """ + + def testExecuteWebhookRequest(self): + """Test ExecuteWebhookRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_connection_integration_response.py b/test/test_external_connection_integration_response.py new file mode 100644 index 0000000..037b582 --- /dev/null +++ b/test/test_external_connection_integration_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.external_connection_integration_response import ExternalConnectionIntegrationResponse + +class TestExternalConnectionIntegrationResponse(unittest.TestCase): + """ExternalConnectionIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExternalConnectionIntegrationResponse: + """Test ExternalConnectionIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExternalConnectionIntegrationResponse` + """ + model = ExternalConnectionIntegrationResponse() + if include_optional: + return ExternalConnectionIntegrationResponse( + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + enabled = True, + id = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + revoked = True, + expire_behavior = 56, + expire_grace_period = 56, + subscriber_count = 56, + synced_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_id = '9072888001528021798096225500850762068629339333975650685139102691291', + syncing = True, + enable_emoticons = True + ) + else: + return ExternalConnectionIntegrationResponse( + type = '', + id = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + ) + """ + + def testExternalConnectionIntegrationResponse(self): + """Test ExternalConnectionIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_scheduled_event_create_request.py b/test/test_external_scheduled_event_create_request.py new file mode 100644 index 0000000..c2e65c9 --- /dev/null +++ b/test/test_external_scheduled_event_create_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.external_scheduled_event_create_request import ExternalScheduledEventCreateRequest + +class TestExternalScheduledEventCreateRequest(unittest.TestCase): + """ExternalScheduledEventCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExternalScheduledEventCreateRequest: + """Test ExternalScheduledEventCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExternalScheduledEventCreateRequest` + """ + model = ExternalScheduledEventCreateRequest() + if include_optional: + return ExternalScheduledEventCreateRequest( + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.entity_metadata_external.EntityMetadataExternal( + location = '', ) + ) + else: + return ExternalScheduledEventCreateRequest( + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + entity_metadata = dc_rest.models.entity_metadata_external.EntityMetadataExternal( + location = '', ), + ) + """ + + def testExternalScheduledEventCreateRequest(self): + """Test ExternalScheduledEventCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_scheduled_event_patch_request_partial.py b/test/test_external_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..809e12a --- /dev/null +++ b/test/test_external_scheduled_event_patch_request_partial.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.external_scheduled_event_patch_request_partial import ExternalScheduledEventPatchRequestPartial + +class TestExternalScheduledEventPatchRequestPartial(unittest.TestCase): + """ExternalScheduledEventPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExternalScheduledEventPatchRequestPartial: + """Test ExternalScheduledEventPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExternalScheduledEventPatchRequestPartial` + """ + model = ExternalScheduledEventPatchRequestPartial() + if include_optional: + return ExternalScheduledEventPatchRequestPartial( + status = 56, + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + entity_type = 56, + privacy_level = None, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.entity_metadata_external.EntityMetadataExternal( + location = '', ) + ) + else: + return ExternalScheduledEventPatchRequestPartial( + ) + """ + + def testExternalScheduledEventPatchRequestPartial(self): + """Test ExternalScheduledEventPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_scheduled_event_response.py b/test/test_external_scheduled_event_response.py new file mode 100644 index 0000000..82a4b54 --- /dev/null +++ b/test/test_external_scheduled_event_response.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.external_scheduled_event_response import ExternalScheduledEventResponse + +class TestExternalScheduledEventResponse(unittest.TestCase): + """ExternalScheduledEventResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExternalScheduledEventResponse: + """Test ExternalScheduledEventResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExternalScheduledEventResponse` + """ + model = ExternalScheduledEventResponse() + if include_optional: + return ExternalScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = None, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ), ), + entity_metadata = dc_rest.models.entity_metadata_external_response.EntityMetadataExternalResponse( + location = '', ) + ) + else: + return ExternalScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + privacy_level = None, + entity_metadata = dc_rest.models.entity_metadata_external_response.EntityMetadataExternalResponse( + location = '', ), + ) + """ + + def testExternalScheduledEventResponse(self): + """Test ExternalScheduledEventResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_component_for_message_request.py b/test/test_file_component_for_message_request.py new file mode 100644 index 0000000..a734a23 --- /dev/null +++ b/test/test_file_component_for_message_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.file_component_for_message_request import FileComponentForMessageRequest + +class TestFileComponentForMessageRequest(unittest.TestCase): + """FileComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileComponentForMessageRequest: + """Test FileComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileComponentForMessageRequest` + """ + model = FileComponentForMessageRequest() + if include_optional: + return FileComponentForMessageRequest( + type = 56, + spoiler = True, + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ) + ) + else: + return FileComponentForMessageRequest( + type = 56, + file = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + ) + """ + + def testFileComponentForMessageRequest(self): + """Test FileComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_component_response.py b/test/test_file_component_response.py new file mode 100644 index 0000000..733f984 --- /dev/null +++ b/test/test_file_component_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.file_component_response import FileComponentResponse + +class TestFileComponentResponse(unittest.TestCase): + """FileComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileComponentResponse: + """Test FileComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileComponentResponse` + """ + model = FileComponentResponse() + if include_optional: + return FileComponentResponse( + type = 56, + id = 56, + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + name = '', + size = 56, + spoiler = True + ) + else: + return FileComponentResponse( + type = 56, + id = 56, + file = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + spoiler = True, + ) + """ + + def testFileComponentResponse(self): + """Test FileComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flag_to_channel_action.py b/test/test_flag_to_channel_action.py new file mode 100644 index 0000000..145b5b3 --- /dev/null +++ b/test/test_flag_to_channel_action.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.flag_to_channel_action import FlagToChannelAction + +class TestFlagToChannelAction(unittest.TestCase): + """FlagToChannelAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlagToChannelAction: + """Test FlagToChannelAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlagToChannelAction` + """ + model = FlagToChannelAction() + if include_optional: + return FlagToChannelAction( + type = 56, + metadata = dc_rest.models.flag_to_channel_action_metadata.FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ) + else: + return FlagToChannelAction( + type = 56, + metadata = dc_rest.models.flag_to_channel_action_metadata.FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + ) + """ + + def testFlagToChannelAction(self): + """Test FlagToChannelAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flag_to_channel_action_metadata.py b/test/test_flag_to_channel_action_metadata.py new file mode 100644 index 0000000..3746f5b --- /dev/null +++ b/test/test_flag_to_channel_action_metadata.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.flag_to_channel_action_metadata import FlagToChannelActionMetadata + +class TestFlagToChannelActionMetadata(unittest.TestCase): + """FlagToChannelActionMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlagToChannelActionMetadata: + """Test FlagToChannelActionMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlagToChannelActionMetadata` + """ + model = FlagToChannelActionMetadata() + if include_optional: + return FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testFlagToChannelActionMetadata(self): + """Test FlagToChannelActionMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flag_to_channel_action_metadata_response.py b/test/test_flag_to_channel_action_metadata_response.py new file mode 100644 index 0000000..7e11113 --- /dev/null +++ b/test/test_flag_to_channel_action_metadata_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.flag_to_channel_action_metadata_response import FlagToChannelActionMetadataResponse + +class TestFlagToChannelActionMetadataResponse(unittest.TestCase): + """FlagToChannelActionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlagToChannelActionMetadataResponse: + """Test FlagToChannelActionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlagToChannelActionMetadataResponse` + """ + model = FlagToChannelActionMetadataResponse() + if include_optional: + return FlagToChannelActionMetadataResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return FlagToChannelActionMetadataResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testFlagToChannelActionMetadataResponse(self): + """Test FlagToChannelActionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flag_to_channel_action_response.py b/test/test_flag_to_channel_action_response.py new file mode 100644 index 0000000..3abca94 --- /dev/null +++ b/test/test_flag_to_channel_action_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.flag_to_channel_action_response import FlagToChannelActionResponse + +class TestFlagToChannelActionResponse(unittest.TestCase): + """FlagToChannelActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlagToChannelActionResponse: + """Test FlagToChannelActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlagToChannelActionResponse` + """ + model = FlagToChannelActionResponse() + if include_optional: + return FlagToChannelActionResponse( + type = 56, + metadata = dc_rest.models.flag_to_channel_action_metadata.FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ) + else: + return FlagToChannelActionResponse( + type = 56, + metadata = dc_rest.models.flag_to_channel_action_metadata.FlagToChannelActionMetadata( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + ) + """ + + def testFlagToChannelActionResponse(self): + """Test FlagToChannelActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_follow_channel_request.py b/test/test_follow_channel_request.py new file mode 100644 index 0000000..ee87869 --- /dev/null +++ b/test/test_follow_channel_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.follow_channel_request import FollowChannelRequest + +class TestFollowChannelRequest(unittest.TestCase): + """FollowChannelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FollowChannelRequest: + """Test FollowChannelRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FollowChannelRequest` + """ + model = FollowChannelRequest() + if include_optional: + return FollowChannelRequest( + webhook_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return FollowChannelRequest( + webhook_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testFollowChannelRequest(self): + """Test FollowChannelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_forum_tag_response.py b/test/test_forum_tag_response.py new file mode 100644 index 0000000..a457ea8 --- /dev/null +++ b/test/test_forum_tag_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.forum_tag_response import ForumTagResponse + +class TestForumTagResponse(unittest.TestCase): + """ForumTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ForumTagResponse: + """Test ForumTagResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ForumTagResponse` + """ + model = ForumTagResponse() + if include_optional: + return ForumTagResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + moderated = True, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '' + ) + else: + return ForumTagResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + moderated = True, + ) + """ + + def testForumTagResponse(self): + """Test ForumTagResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_friend_invite_response.py b/test/test_friend_invite_response.py new file mode 100644 index 0000000..fec1cfa --- /dev/null +++ b/test/test_friend_invite_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.friend_invite_response import FriendInviteResponse + +class TestFriendInviteResponse(unittest.TestCase): + """FriendInviteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FriendInviteResponse: + """Test FriendInviteResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FriendInviteResponse` + """ + model = FriendInviteResponse() + if include_optional: + return FriendInviteResponse( + type = 56, + code = '', + inviter = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + max_age = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + friends_count = 56, + channel = dc_rest.models.invite_channel_response.InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + icon = '', + recipients = [ + dc_rest.models.invite_channel_recipient_response.InviteChannelRecipientResponse( + username = '', ) + ], ), + is_contact = True, + uses = 56, + max_uses = 56, + flags = 56 + ) + else: + return FriendInviteResponse( + code = '', + ) + """ + + def testFriendInviteResponse(self): + """Test FriendInviteResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gateway_bot_response.py b/test/test_gateway_bot_response.py new file mode 100644 index 0000000..1028d1c --- /dev/null +++ b/test/test_gateway_bot_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.gateway_bot_response import GatewayBotResponse + +class TestGatewayBotResponse(unittest.TestCase): + """GatewayBotResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GatewayBotResponse: + """Test GatewayBotResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GatewayBotResponse` + """ + model = GatewayBotResponse() + if include_optional: + return GatewayBotResponse( + url = '', + session_start_limit = dc_rest.models.gateway_bot_session_start_limit_response.GatewayBotSessionStartLimitResponse( + max_concurrency = 56, + remaining = 56, + reset_after = 56, + total = 56, ), + shards = 56 + ) + else: + return GatewayBotResponse( + url = '', + session_start_limit = dc_rest.models.gateway_bot_session_start_limit_response.GatewayBotSessionStartLimitResponse( + max_concurrency = 56, + remaining = 56, + reset_after = 56, + total = 56, ), + shards = 56, + ) + """ + + def testGatewayBotResponse(self): + """Test GatewayBotResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gateway_bot_session_start_limit_response.py b/test/test_gateway_bot_session_start_limit_response.py new file mode 100644 index 0000000..a6bddf6 --- /dev/null +++ b/test/test_gateway_bot_session_start_limit_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.gateway_bot_session_start_limit_response import GatewayBotSessionStartLimitResponse + +class TestGatewayBotSessionStartLimitResponse(unittest.TestCase): + """GatewayBotSessionStartLimitResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GatewayBotSessionStartLimitResponse: + """Test GatewayBotSessionStartLimitResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GatewayBotSessionStartLimitResponse` + """ + model = GatewayBotSessionStartLimitResponse() + if include_optional: + return GatewayBotSessionStartLimitResponse( + max_concurrency = 56, + remaining = 56, + reset_after = 56, + total = 56 + ) + else: + return GatewayBotSessionStartLimitResponse( + max_concurrency = 56, + remaining = 56, + reset_after = 56, + total = 56, + ) + """ + + def testGatewayBotSessionStartLimitResponse(self): + """Test GatewayBotSessionStartLimitResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gateway_response.py b/test/test_gateway_response.py new file mode 100644 index 0000000..a217519 --- /dev/null +++ b/test/test_gateway_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.gateway_response import GatewayResponse + +class TestGatewayResponse(unittest.TestCase): + """GatewayResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GatewayResponse: + """Test GatewayResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GatewayResponse` + """ + model = GatewayResponse() + if include_optional: + return GatewayResponse( + url = '' + ) + else: + return GatewayResponse( + url = '', + ) + """ + + def testGatewayResponse(self): + """Test GatewayResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_channel200_response.py b/test/test_get_channel200_response.py new file mode 100644 index 0000000..a6ec0a9 --- /dev/null +++ b/test/test_get_channel200_response.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.get_channel200_response import GetChannel200Response + +class TestGetChannel200Response(unittest.TestCase): + """GetChannel200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetChannel200Response: + """Test GetChannel200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetChannel200Response` + """ + model = GetChannel200Response() + if include_optional: + return GetChannel200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + topic = '', + default_auto_archive_duration = 56, + default_thread_rate_limit_per_user = 56, + position = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + nsfw = True, + available_tags = [ + dc_rest.models.forum_tag_response.ForumTagResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + moderated = True, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ], + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + hd_streaming_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hd_streaming_buyer_id = '9072888001528021798096225500850762068629339333975650685139102691291', + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + icon = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + managed = True, + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ) + ) + else: + return GetChannel200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56, + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_count = 56, + member_count = 56, + total_message_sent = 56, + ) + """ + + def testGetChannel200Response(self): + """Test GetChannel200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_entitlements_sku_ids_parameter.py b/test/test_get_entitlements_sku_ids_parameter.py new file mode 100644 index 0000000..51d3ad5 --- /dev/null +++ b/test/test_get_entitlements_sku_ids_parameter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.get_entitlements_sku_ids_parameter import GetEntitlementsSkuIdsParameter + +class TestGetEntitlementsSkuIdsParameter(unittest.TestCase): + """GetEntitlementsSkuIdsParameter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetEntitlementsSkuIdsParameter: + """Test GetEntitlementsSkuIdsParameter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetEntitlementsSkuIdsParameter` + """ + model = GetEntitlementsSkuIdsParameter() + if include_optional: + return GetEntitlementsSkuIdsParameter( + ) + else: + return GetEntitlementsSkuIdsParameter( + ) + """ + + def testGetEntitlementsSkuIdsParameter(self): + """Test GetEntitlementsSkuIdsParameter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_sticker200_response.py b/test/test_get_sticker200_response.py new file mode 100644 index 0000000..45e8a49 --- /dev/null +++ b/test/test_get_sticker200_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.get_sticker200_response import GetSticker200Response + +class TestGetSticker200Response(unittest.TestCase): + """GetSticker200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSticker200Response: + """Test GetSticker200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetSticker200Response` + """ + model = GetSticker200Response() + if include_optional: + return GetSticker200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56 + ) + else: + return GetSticker200Response( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, + ) + """ + + def testGetSticker200Response(self): + """Test GetSticker200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_author.py b/test/test_github_author.py new file mode 100644 index 0000000..2849b9d --- /dev/null +++ b/test/test_github_author.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_author import GithubAuthor + +class TestGithubAuthor(unittest.TestCase): + """GithubAuthor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubAuthor: + """Test GithubAuthor + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubAuthor` + """ + model = GithubAuthor() + if include_optional: + return GithubAuthor( + username = '', + name = '' + ) + else: + return GithubAuthor( + name = '', + ) + """ + + def testGithubAuthor(self): + """Test GithubAuthor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_check_app.py b/test/test_github_check_app.py new file mode 100644 index 0000000..a16abc0 --- /dev/null +++ b/test/test_github_check_app.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_check_app import GithubCheckApp + +class TestGithubCheckApp(unittest.TestCase): + """GithubCheckApp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCheckApp: + """Test GithubCheckApp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCheckApp` + """ + model = GithubCheckApp() + if include_optional: + return GithubCheckApp( + name = '' + ) + else: + return GithubCheckApp( + name = '', + ) + """ + + def testGithubCheckApp(self): + """Test GithubCheckApp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_check_pull_request.py b/test/test_github_check_pull_request.py new file mode 100644 index 0000000..2bcb2b4 --- /dev/null +++ b/test/test_github_check_pull_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_check_pull_request import GithubCheckPullRequest + +class TestGithubCheckPullRequest(unittest.TestCase): + """GithubCheckPullRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCheckPullRequest: + """Test GithubCheckPullRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCheckPullRequest` + """ + model = GithubCheckPullRequest() + if include_optional: + return GithubCheckPullRequest( + number = 56 + ) + else: + return GithubCheckPullRequest( + number = 56, + ) + """ + + def testGithubCheckPullRequest(self): + """Test GithubCheckPullRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_check_run.py b/test/test_github_check_run.py new file mode 100644 index 0000000..f8fad4e --- /dev/null +++ b/test/test_github_check_run.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_check_run import GithubCheckRun + +class TestGithubCheckRun(unittest.TestCase): + """GithubCheckRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCheckRun: + """Test GithubCheckRun + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCheckRun` + """ + model = GithubCheckRun() + if include_optional: + return GithubCheckRun( + conclusion = '', + name = '', + html_url = '', + check_suite = dc_rest.models.github_check_suite.GithubCheckSuite( + conclusion = '', + head_branch = '', + head_sha = '', + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ), ), + details_url = '', + output = dc_rest.models.github_check_run_output.GithubCheckRunOutput( + title = '', + summary = '', ), + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ] + ) + else: + return GithubCheckRun( + name = '', + html_url = '', + check_suite = dc_rest.models.github_check_suite.GithubCheckSuite( + conclusion = '', + head_branch = '', + head_sha = '', + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ), ), + ) + """ + + def testGithubCheckRun(self): + """Test GithubCheckRun""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_check_run_output.py b/test/test_github_check_run_output.py new file mode 100644 index 0000000..b25da7f --- /dev/null +++ b/test/test_github_check_run_output.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_check_run_output import GithubCheckRunOutput + +class TestGithubCheckRunOutput(unittest.TestCase): + """GithubCheckRunOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCheckRunOutput: + """Test GithubCheckRunOutput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCheckRunOutput` + """ + model = GithubCheckRunOutput() + if include_optional: + return GithubCheckRunOutput( + title = '', + summary = '' + ) + else: + return GithubCheckRunOutput( + ) + """ + + def testGithubCheckRunOutput(self): + """Test GithubCheckRunOutput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_check_suite.py b/test/test_github_check_suite.py new file mode 100644 index 0000000..f434285 --- /dev/null +++ b/test/test_github_check_suite.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_check_suite import GithubCheckSuite + +class TestGithubCheckSuite(unittest.TestCase): + """GithubCheckSuite unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCheckSuite: + """Test GithubCheckSuite + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCheckSuite` + """ + model = GithubCheckSuite() + if include_optional: + return GithubCheckSuite( + conclusion = '', + head_branch = '', + head_sha = '', + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ) + ) + else: + return GithubCheckSuite( + head_sha = '', + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ), + ) + """ + + def testGithubCheckSuite(self): + """Test GithubCheckSuite""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_comment.py b/test/test_github_comment.py new file mode 100644 index 0000000..7535440 --- /dev/null +++ b/test/test_github_comment.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_comment import GithubComment + +class TestGithubComment(unittest.TestCase): + """GithubComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubComment: + """Test GithubComment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubComment` + """ + model = GithubComment() + if include_optional: + return GithubComment( + id = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + commit_id = '', + body = '' + ) + else: + return GithubComment( + id = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + body = '', + ) + """ + + def testGithubComment(self): + """Test GithubComment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_commit.py b/test/test_github_commit.py new file mode 100644 index 0000000..703a437 --- /dev/null +++ b/test/test_github_commit.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_commit import GithubCommit + +class TestGithubCommit(unittest.TestCase): + """GithubCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubCommit: + """Test GithubCommit + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubCommit` + """ + model = GithubCommit() + if include_optional: + return GithubCommit( + id = '', + url = '', + message = '', + author = dc_rest.models.github_author.GithubAuthor( + username = '', + name = '', ) + ) + else: + return GithubCommit( + id = '', + url = '', + message = '', + author = dc_rest.models.github_author.GithubAuthor( + username = '', + name = '', ), + ) + """ + + def testGithubCommit(self): + """Test GithubCommit""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_discussion.py b/test/test_github_discussion.py new file mode 100644 index 0000000..628d512 --- /dev/null +++ b/test/test_github_discussion.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_discussion import GithubDiscussion + +class TestGithubDiscussion(unittest.TestCase): + """GithubDiscussion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubDiscussion: + """Test GithubDiscussion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubDiscussion` + """ + model = GithubDiscussion() + if include_optional: + return GithubDiscussion( + title = '', + number = 56, + html_url = '', + answer_html_url = '', + body = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ) + ) + else: + return GithubDiscussion( + title = '', + number = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + ) + """ + + def testGithubDiscussion(self): + """Test GithubDiscussion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_issue.py b/test/test_github_issue.py new file mode 100644 index 0000000..60f50c1 --- /dev/null +++ b/test/test_github_issue.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_issue import GithubIssue + +class TestGithubIssue(unittest.TestCase): + """GithubIssue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubIssue: + """Test GithubIssue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubIssue` + """ + model = GithubIssue() + if include_optional: + return GithubIssue( + id = 56, + number = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + title = '', + body = '', + pull_request = None + ) + else: + return GithubIssue( + id = 56, + number = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + title = '', + ) + """ + + def testGithubIssue(self): + """Test GithubIssue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_release.py b/test/test_github_release.py new file mode 100644 index 0000000..f097cde --- /dev/null +++ b/test/test_github_release.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_release import GithubRelease + +class TestGithubRelease(unittest.TestCase): + """GithubRelease unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubRelease: + """Test GithubRelease + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubRelease` + """ + model = GithubRelease() + if include_optional: + return GithubRelease( + id = 56, + tag_name = '', + html_url = '', + author = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ) + ) + else: + return GithubRelease( + id = 56, + tag_name = '', + html_url = '', + author = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + ) + """ + + def testGithubRelease(self): + """Test GithubRelease""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_repository.py b/test/test_github_repository.py new file mode 100644 index 0000000..9c2fb32 --- /dev/null +++ b/test/test_github_repository.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_repository import GithubRepository + +class TestGithubRepository(unittest.TestCase): + """GithubRepository unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubRepository: + """Test GithubRepository + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubRepository` + """ + model = GithubRepository() + if include_optional: + return GithubRepository( + id = 56, + html_url = '', + name = '', + full_name = '' + ) + else: + return GithubRepository( + id = 56, + html_url = '', + name = '', + full_name = '', + ) + """ + + def testGithubRepository(self): + """Test GithubRepository""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_review.py b/test/test_github_review.py new file mode 100644 index 0000000..113ca3f --- /dev/null +++ b/test/test_github_review.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_review import GithubReview + +class TestGithubReview(unittest.TestCase): + """GithubReview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubReview: + """Test GithubReview + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubReview` + """ + model = GithubReview() + if include_optional: + return GithubReview( + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + body = '', + html_url = '', + state = '' + ) + else: + return GithubReview( + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + html_url = '', + state = '', + ) + """ + + def testGithubReview(self): + """Test GithubReview""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_user.py b/test/test_github_user.py new file mode 100644 index 0000000..d2cefbf --- /dev/null +++ b/test/test_github_user.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_user import GithubUser + +class TestGithubUser(unittest.TestCase): + """GithubUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubUser: + """Test GithubUser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubUser` + """ + model = GithubUser() + if include_optional: + return GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '' + ) + else: + return GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', + ) + """ + + def testGithubUser(self): + """Test GithubUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_github_webhook.py b/test/test_github_webhook.py new file mode 100644 index 0000000..529b397 --- /dev/null +++ b/test/test_github_webhook.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.github_webhook import GithubWebhook + +class TestGithubWebhook(unittest.TestCase): + """GithubWebhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GithubWebhook: + """Test GithubWebhook + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GithubWebhook` + """ + model = GithubWebhook() + if include_optional: + return GithubWebhook( + action = '', + ref = '', + ref_type = '', + comment = dc_rest.models.github_comment.GithubComment( + id = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + commit_id = '', + body = '', ), + issue = dc_rest.models.github_issue.GithubIssue( + id = 56, + number = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + title = '', + body = '', + pull_request = null, ), + pull_request = dc_rest.models.github_issue.GithubIssue( + id = 56, + number = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + title = '', + body = '', + pull_request = null, ), + repository = dc_rest.models.github_repository.GithubRepository( + id = 56, + html_url = '', + name = '', + full_name = '', ), + forkee = dc_rest.models.github_repository.GithubRepository( + id = 56, + html_url = '', + name = '', + full_name = '', ), + sender = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + member = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + release = dc_rest.models.github_release.GithubRelease( + id = 56, + tag_name = '', + html_url = '', + author = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), ), + head_commit = dc_rest.models.github_commit.GithubCommit( + id = '', + url = '', + message = '', + author = dc_rest.models.github_author.GithubAuthor( + username = '', + name = '', ), ), + commits = [ + dc_rest.models.github_commit.GithubCommit( + id = '', + url = '', + message = '', + author = dc_rest.models.github_author.GithubAuthor( + username = '', + name = '', ), ) + ], + forced = True, + compare = '', + review = dc_rest.models.github_review.GithubReview( + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + body = '', + html_url = '', + state = '', ), + check_run = dc_rest.models.github_check_run.GithubCheckRun( + conclusion = '', + name = '', + html_url = '', + check_suite = dc_rest.models.github_check_suite.GithubCheckSuite( + conclusion = '', + head_branch = '', + head_sha = '', + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ), ), + details_url = '', + output = dc_rest.models.github_check_run_output.GithubCheckRunOutput( + title = '', + summary = '', ), + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], ), + check_suite = dc_rest.models.github_check_suite.GithubCheckSuite( + conclusion = '', + head_branch = '', + head_sha = '', + pull_requests = [ + dc_rest.models.github_check_pull_request.GithubCheckPullRequest( + number = 56, ) + ], + app = dc_rest.models.github_check_app.GithubCheckApp( + name = '', ), ), + discussion = dc_rest.models.github_discussion.GithubDiscussion( + title = '', + number = 56, + html_url = '', + answer_html_url = '', + body = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), ), + answer = dc_rest.models.github_comment.GithubComment( + id = 56, + html_url = '', + user = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + commit_id = '', + body = '', ) + ) + else: + return GithubWebhook( + sender = dc_rest.models.github_user.GithubUser( + id = 56, + login = '', + html_url = '', + avatar_url = '', ), + ) + """ + + def testGithubWebhook(self): + """Test GithubWebhook""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_dm_invite_response.py b/test/test_group_dm_invite_response.py new file mode 100644 index 0000000..f540fc7 --- /dev/null +++ b/test/test_group_dm_invite_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.group_dm_invite_response import GroupDMInviteResponse + +class TestGroupDMInviteResponse(unittest.TestCase): + """GroupDMInviteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupDMInviteResponse: + """Test GroupDMInviteResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupDMInviteResponse` + """ + model = GroupDMInviteResponse() + if include_optional: + return GroupDMInviteResponse( + type = 56, + code = '', + inviter = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + max_age = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + channel = dc_rest.models.invite_channel_response.InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + icon = '', + recipients = [ + dc_rest.models.invite_channel_recipient_response.InviteChannelRecipientResponse( + username = '', ) + ], ), + approximate_member_count = 56 + ) + else: + return GroupDMInviteResponse( + code = '', + ) + """ + + def testGroupDMInviteResponse(self): + """Test GroupDMInviteResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_audit_log_response.py b/test/test_guild_audit_log_response.py new file mode 100644 index 0000000..4c2632b --- /dev/null +++ b/test/test_guild_audit_log_response.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_audit_log_response import GuildAuditLogResponse + +class TestGuildAuditLogResponse(unittest.TestCase): + """GuildAuditLogResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildAuditLogResponse: + """Test GuildAuditLogResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildAuditLogResponse` + """ + model = GuildAuditLogResponse() + if include_optional: + return GuildAuditLogResponse( + audit_log_entries = [ + dc_rest.models.audit_log_entry_response.AuditLogEntryResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_id = '9072888001528021798096225500850762068629339333975650685139102691291', + changes = [ + dc_rest.models.audit_log_object_change_response.AuditLogObjectChangeResponse( + key = '', + new_value = null, + old_value = null, ) + ], + options = { + 'key' : '' + }, + reason = '', ) + ], + users = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + integrations = [ + null + ], + webhooks = [ + null + ], + guild_scheduled_events = [ + null + ], + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + application_commands = [ + dc_rest.models.application_command_response.ApplicationCommandResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + version = '9072888001528021798096225500850762068629339333975650685139102691291', + default_member_permissions = '', + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + options = [ + null + ], + nsfw = True, ) + ], + auto_moderation_rules = [ + null + ] + ) + else: + return GuildAuditLogResponse( + audit_log_entries = [ + dc_rest.models.audit_log_entry_response.AuditLogEntryResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_id = '9072888001528021798096225500850762068629339333975650685139102691291', + changes = [ + dc_rest.models.audit_log_object_change_response.AuditLogObjectChangeResponse( + key = '', + new_value = null, + old_value = null, ) + ], + options = { + 'key' : '' + }, + reason = '', ) + ], + users = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + integrations = [ + null + ], + webhooks = [ + null + ], + guild_scheduled_events = [ + null + ], + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + application_commands = [ + dc_rest.models.application_command_response.ApplicationCommandResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + version = '9072888001528021798096225500850762068629339333975650685139102691291', + default_member_permissions = '', + type = 56, + name = '', + name_localized = '', + name_localizations = { + 'key' : '' + }, + description = '', + description_localized = '', + description_localizations = { + 'key' : '' + }, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + dm_permission = True, + contexts = [ + 56 + ], + integration_types = [ + 56 + ], + options = [ + null + ], + nsfw = True, ) + ], + auto_moderation_rules = [ + null + ], + ) + """ + + def testGuildAuditLogResponse(self): + """Test GuildAuditLogResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_audit_log_response_integrations_inner.py b/test/test_guild_audit_log_response_integrations_inner.py new file mode 100644 index 0000000..8111417 --- /dev/null +++ b/test/test_guild_audit_log_response_integrations_inner.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_audit_log_response_integrations_inner import GuildAuditLogResponseIntegrationsInner + +class TestGuildAuditLogResponseIntegrationsInner(unittest.TestCase): + """GuildAuditLogResponseIntegrationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildAuditLogResponseIntegrationsInner: + """Test GuildAuditLogResponseIntegrationsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildAuditLogResponseIntegrationsInner` + """ + model = GuildAuditLogResponseIntegrationsInner() + if include_optional: + return GuildAuditLogResponseIntegrationsInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return GuildAuditLogResponseIntegrationsInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testGuildAuditLogResponseIntegrationsInner(self): + """Test GuildAuditLogResponseIntegrationsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_ban_response.py b/test/test_guild_ban_response.py new file mode 100644 index 0000000..d3200e8 --- /dev/null +++ b/test/test_guild_ban_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_ban_response import GuildBanResponse + +class TestGuildBanResponse(unittest.TestCase): + """GuildBanResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildBanResponse: + """Test GuildBanResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildBanResponse` + """ + model = GuildBanResponse() + if include_optional: + return GuildBanResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + reason = '' + ) + else: + return GuildBanResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + ) + """ + + def testGuildBanResponse(self): + """Test GuildBanResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_channel_location.py b/test/test_guild_channel_location.py new file mode 100644 index 0000000..286b297 --- /dev/null +++ b/test/test_guild_channel_location.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_channel_location import GuildChannelLocation + +class TestGuildChannelLocation(unittest.TestCase): + """GuildChannelLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildChannelLocation: + """Test GuildChannelLocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildChannelLocation` + """ + model = GuildChannelLocation() + if include_optional: + return GuildChannelLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return GuildChannelLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testGuildChannelLocation(self): + """Test GuildChannelLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_channel_response.py b/test/test_guild_channel_response.py new file mode 100644 index 0000000..1357052 --- /dev/null +++ b/test/test_guild_channel_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_channel_response import GuildChannelResponse + +class TestGuildChannelResponse(unittest.TestCase): + """GuildChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildChannelResponse: + """Test GuildChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildChannelResponse` + """ + model = GuildChannelResponse() + if include_optional: + return GuildChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + topic = '', + default_auto_archive_duration = 56, + default_thread_rate_limit_per_user = 56, + position = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + nsfw = True, + available_tags = [ + dc_rest.models.forum_tag_response.ForumTagResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + moderated = True, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ], + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + hd_streaming_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hd_streaming_buyer_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return GuildChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56, + ) + """ + + def testGuildChannelResponse(self): + """Test GuildChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_create_request.py b/test/test_guild_create_request.py new file mode 100644 index 0000000..128220e --- /dev/null +++ b/test/test_guild_create_request.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_create_request import GuildCreateRequest + +class TestGuildCreateRequest(unittest.TestCase): + """GuildCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildCreateRequest: + """Test GuildCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildCreateRequest` + """ + model = GuildCreateRequest() + if include_optional: + return GuildCreateRequest( + description = '', + name = '01', + region = '', + icon = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_timeout = 56, + roles = [ + dc_rest.models.create_guild_request_role_item.CreateGuildRequestRoleItem( + id = 56, + name = '', + permissions = 56, + color = 0, + hoist = True, + mentionable = True, + unicode_emoji = '', ) + ], + channels = [ + dc_rest.models.create_guild_request_channel_item.CreateGuildRequestChannelItem( + type = 0, + name = '0', + position = 0, + topic = '', + bitrate = 8000, + user_limit = 0, + nsfw = True, + rate_limit_per_user = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_request.ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56, ) + ], + rtc_region = '', + video_quality_mode = 56, + default_auto_archive_duration = 56, + default_reaction_emoji = dc_rest.models.update_default_reaction_emoji_request.UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 0, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_tags = [ + dc_rest.models.create_or_update_thread_tag_request.CreateOrUpdateThreadTagRequest( + name = '', + emoji_name = '', + moderated = True, ) + ], ) + ], + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56 + ) + else: + return GuildCreateRequest( + name = '01', + ) + """ + + def testGuildCreateRequest(self): + """Test GuildCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_home_settings_response.py b/test/test_guild_home_settings_response.py new file mode 100644 index 0000000..33d80ae --- /dev/null +++ b/test/test_guild_home_settings_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_home_settings_response import GuildHomeSettingsResponse + +class TestGuildHomeSettingsResponse(unittest.TestCase): + """GuildHomeSettingsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildHomeSettingsResponse: + """Test GuildHomeSettingsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildHomeSettingsResponse` + """ + model = GuildHomeSettingsResponse() + if include_optional: + return GuildHomeSettingsResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + enabled = True, + welcome_message = dc_rest.models.welcome_message_response.WelcomeMessageResponse( + author_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + message = '', ), + new_member_actions = [ + dc_rest.models.new_member_action_response.NewMemberActionResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + icon = '', ) + ], + resource_channels = [ + dc_rest.models.resource_channel_response.ResourceChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + icon = '', + description = '', ) + ] + ) + else: + return GuildHomeSettingsResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + enabled = True, + ) + """ + + def testGuildHomeSettingsResponse(self): + """Test GuildHomeSettingsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_incoming_webhook_response.py b/test/test_guild_incoming_webhook_response.py new file mode 100644 index 0000000..d079ee2 --- /dev/null +++ b/test/test_guild_incoming_webhook_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_incoming_webhook_response import GuildIncomingWebhookResponse + +class TestGuildIncomingWebhookResponse(unittest.TestCase): + """GuildIncomingWebhookResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildIncomingWebhookResponse: + """Test GuildIncomingWebhookResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildIncomingWebhookResponse` + """ + model = GuildIncomingWebhookResponse() + if include_optional: + return GuildIncomingWebhookResponse( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + avatar = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + token = '', + url = '' + ) + else: + return GuildIncomingWebhookResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + ) + """ + + def testGuildIncomingWebhookResponse(self): + """Test GuildIncomingWebhookResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_invite_response.py b/test/test_guild_invite_response.py new file mode 100644 index 0000000..71e2790 --- /dev/null +++ b/test/test_guild_invite_response.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_invite_response import GuildInviteResponse + +class TestGuildInviteResponse(unittest.TestCase): + """GuildInviteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildInviteResponse: + """Test GuildInviteResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildInviteResponse` + """ + model = GuildInviteResponse() + if include_optional: + return GuildInviteResponse( + type = 56, + code = '', + inviter = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + max_age = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_contact = True, + flags = 56, + guild = dc_rest.models.invite_guild_response.InviteGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + splash = '', + banner = '', + description = '', + icon = '', + features = [ + '' + ], + verification_level = 56, + vanity_url_code = '', + nsfw_level = 56, + nsfw = True, + premium_subscription_count = 56, ), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel = dc_rest.models.invite_channel_response.InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + icon = '', + recipients = [ + dc_rest.models.invite_channel_recipient_response.InviteChannelRecipientResponse( + username = '', ) + ], ), + target_type = 56, + target_user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + target_application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + guild_scheduled_event = dc_rest.models.scheduled_event_response.ScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = null, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = , + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ), ), ), + uses = 56, + max_uses = 56, + temporary = True, + approximate_member_count = 56, + approximate_presence_count = 56, + is_nickname_changeable = True + ) + else: + return GuildInviteResponse( + code = '', + ) + """ + + def testGuildInviteResponse(self): + """Test GuildInviteResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_member_response.py b/test/test_guild_member_response.py new file mode 100644 index 0000000..d130727 --- /dev/null +++ b/test/test_guild_member_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_member_response import GuildMemberResponse + +class TestGuildMemberResponse(unittest.TestCase): + """GuildMemberResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildMemberResponse: + """Test GuildMemberResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildMemberResponse` + """ + model = GuildMemberResponse() + if include_optional: + return GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True + ) + else: + return GuildMemberResponse( + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pending = True, + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, + ) + """ + + def testGuildMemberResponse(self): + """Test GuildMemberResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_mfa_level_response.py b/test/test_guild_mfa_level_response.py new file mode 100644 index 0000000..af87236 --- /dev/null +++ b/test/test_guild_mfa_level_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_mfa_level_response import GuildMFALevelResponse + +class TestGuildMFALevelResponse(unittest.TestCase): + """GuildMFALevelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildMFALevelResponse: + """Test GuildMFALevelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildMFALevelResponse` + """ + model = GuildMFALevelResponse() + if include_optional: + return GuildMFALevelResponse( + level = 56 + ) + else: + return GuildMFALevelResponse( + level = 56, + ) + """ + + def testGuildMFALevelResponse(self): + """Test GuildMFALevelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_onboarding_response.py b/test/test_guild_onboarding_response.py new file mode 100644 index 0000000..4ee4445 --- /dev/null +++ b/test/test_guild_onboarding_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_onboarding_response import GuildOnboardingResponse + +class TestGuildOnboardingResponse(unittest.TestCase): + """GuildOnboardingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildOnboardingResponse: + """Test GuildOnboardingResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildOnboardingResponse` + """ + model = GuildOnboardingResponse() + if include_optional: + return GuildOnboardingResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + prompts = [ + dc_rest.models.onboarding_prompt_response.OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, ) + ], + default_channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + enabled = True + ) + else: + return GuildOnboardingResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + prompts = [ + dc_rest.models.onboarding_prompt_response.OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, ) + ], + default_channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + enabled = True, + ) + """ + + def testGuildOnboardingResponse(self): + """Test GuildOnboardingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_patch_request_partial.py b/test/test_guild_patch_request_partial.py new file mode 100644 index 0000000..0760cfb --- /dev/null +++ b/test/test_guild_patch_request_partial.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_patch_request_partial import GuildPatchRequestPartial + +class TestGuildPatchRequestPartial(unittest.TestCase): + """GuildPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildPatchRequestPartial: + """Test GuildPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildPatchRequestPartial` + """ + model = GuildPatchRequestPartial() + if include_optional: + return GuildPatchRequestPartial( + name = '01', + description = '', + region = '', + icon = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_timeout = 56, + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + splash = '', + banner = '', + system_channel_flags = 56, + features = [ + '' + ], + discovery_splash = '', + home_header = '', + rules_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + safety_alerts_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + public_updates_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + premium_progress_bar_enabled = True + ) + else: + return GuildPatchRequestPartial( + ) + """ + + def testGuildPatchRequestPartial(self): + """Test GuildPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_preview_response.py b/test/test_guild_preview_response.py new file mode 100644 index 0000000..ca0cd8b --- /dev/null +++ b/test/test_guild_preview_response.py @@ -0,0 +1,249 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_preview_response import GuildPreviewResponse + +class TestGuildPreviewResponse(unittest.TestCase): + """GuildPreviewResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildPreviewResponse: + """Test GuildPreviewResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildPreviewResponse` + """ + model = GuildPreviewResponse() + if include_optional: + return GuildPreviewResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + home_header = '', + splash = '', + discovery_splash = '', + features = [ + '' + ], + approximate_member_count = 56, + approximate_presence_count = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ] + ) + else: + return GuildPreviewResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + features = [ + '' + ], + approximate_member_count = 56, + approximate_presence_count = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ], + ) + """ + + def testGuildPreviewResponse(self): + """Test GuildPreviewResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_product_purchase_response.py b/test/test_guild_product_purchase_response.py new file mode 100644 index 0000000..10642dd --- /dev/null +++ b/test/test_guild_product_purchase_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_product_purchase_response import GuildProductPurchaseResponse + +class TestGuildProductPurchaseResponse(unittest.TestCase): + """GuildProductPurchaseResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildProductPurchaseResponse: + """Test GuildProductPurchaseResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildProductPurchaseResponse` + """ + model = GuildProductPurchaseResponse() + if include_optional: + return GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '' + ) + else: + return GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', + ) + """ + + def testGuildProductPurchaseResponse(self): + """Test GuildProductPurchaseResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_prune_response.py b/test/test_guild_prune_response.py new file mode 100644 index 0000000..56397c7 --- /dev/null +++ b/test/test_guild_prune_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_prune_response import GuildPruneResponse + +class TestGuildPruneResponse(unittest.TestCase): + """GuildPruneResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildPruneResponse: + """Test GuildPruneResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildPruneResponse` + """ + model = GuildPruneResponse() + if include_optional: + return GuildPruneResponse( + pruned = 56 + ) + else: + return GuildPruneResponse( + ) + """ + + def testGuildPruneResponse(self): + """Test GuildPruneResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_response.py b/test/test_guild_response.py new file mode 100644 index 0000000..b34963d --- /dev/null +++ b/test/test_guild_response.py @@ -0,0 +1,330 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_response import GuildResponse + +class TestGuildResponse(unittest.TestCase): + """GuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildResponse: + """Test GuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildResponse` + """ + model = GuildResponse() + if include_optional: + return GuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + home_header = '', + splash = '', + discovery_splash = '', + features = [ + '' + ], + banner = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + region = '', + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + afk_timeout = 56, + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56, + widget_enabled = True, + widget_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + verification_level = 56, + roles = [ + dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + ], + default_message_notifications = 56, + mfa_level = 56, + explicit_content_filter = 56, + max_presences = 56, + max_members = 56, + max_stage_video_channel_users = 56, + max_video_channel_users = 56, + vanity_url_code = '', + premium_tier = 56, + premium_subscription_count = 56, + preferred_locale = '', + rules_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + safety_alerts_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + public_updates_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + premium_progress_bar_enabled = True, + nsfw = True, + nsfw_level = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ] + ) + else: + return GuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + features = [ + '' + ], + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + region = '', + afk_timeout = 56, + system_channel_flags = 56, + widget_enabled = True, + verification_level = 56, + roles = [ + dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + ], + default_message_notifications = 56, + mfa_level = 56, + explicit_content_filter = 56, + premium_tier = 56, + premium_subscription_count = 56, + preferred_locale = '', + premium_progress_bar_enabled = True, + nsfw = True, + nsfw_level = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ], + ) + """ + + def testGuildResponse(self): + """Test GuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_role_response.py b/test/test_guild_role_response.py new file mode 100644 index 0000000..4b0b711 --- /dev/null +++ b/test/test_guild_role_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_role_response import GuildRoleResponse + +class TestGuildRoleResponse(unittest.TestCase): + """GuildRoleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildRoleResponse: + """Test GuildRoleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildRoleResponse` + """ + model = GuildRoleResponse() + if include_optional: + return GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ) + ) + else: + return GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + ) + """ + + def testGuildRoleResponse(self): + """Test GuildRoleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_role_tags_response.py b/test/test_guild_role_tags_response.py new file mode 100644 index 0000000..3d590bb --- /dev/null +++ b/test/test_guild_role_tags_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_role_tags_response import GuildRoleTagsResponse + +class TestGuildRoleTagsResponse(unittest.TestCase): + """GuildRoleTagsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildRoleTagsResponse: + """Test GuildRoleTagsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildRoleTagsResponse` + """ + model = GuildRoleTagsResponse() + if include_optional: + return GuildRoleTagsResponse( + premium_subscriber = None, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = None, + guild_connections = None + ) + else: + return GuildRoleTagsResponse( + ) + """ + + def testGuildRoleTagsResponse(self): + """Test GuildRoleTagsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_sticker_response.py b/test/test_guild_sticker_response.py new file mode 100644 index 0000000..6ca845c --- /dev/null +++ b/test/test_guild_sticker_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_sticker_response import GuildStickerResponse + +class TestGuildStickerResponse(unittest.TestCase): + """GuildStickerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildStickerResponse: + """Test GuildStickerResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildStickerResponse` + """ + model = GuildStickerResponse() + if include_optional: + return GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testGuildStickerResponse(self): + """Test GuildStickerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_subscription_integration_response.py b/test/test_guild_subscription_integration_response.py new file mode 100644 index 0000000..ad12e48 --- /dev/null +++ b/test/test_guild_subscription_integration_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_subscription_integration_response import GuildSubscriptionIntegrationResponse + +class TestGuildSubscriptionIntegrationResponse(unittest.TestCase): + """GuildSubscriptionIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildSubscriptionIntegrationResponse: + """Test GuildSubscriptionIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildSubscriptionIntegrationResponse` + """ + model = GuildSubscriptionIntegrationResponse() + if include_optional: + return GuildSubscriptionIntegrationResponse( + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + enabled = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return GuildSubscriptionIntegrationResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testGuildSubscriptionIntegrationResponse(self): + """Test GuildSubscriptionIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_template_channel_response.py b/test/test_guild_template_channel_response.py new file mode 100644 index 0000000..0c62fc1 --- /dev/null +++ b/test/test_guild_template_channel_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_template_channel_response import GuildTemplateChannelResponse + +class TestGuildTemplateChannelResponse(unittest.TestCase): + """GuildTemplateChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildTemplateChannelResponse: + """Test GuildTemplateChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildTemplateChannelResponse` + """ + model = GuildTemplateChannelResponse() + if include_optional: + return GuildTemplateChannelResponse( + id = 56, + type = 56, + name = '', + position = 56, + topic = '', + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + default_auto_archive_duration = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + available_tags = [ + dc_rest.models.guild_template_channel_tags.GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ], + template = '', + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 56, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + icon_emoji = dc_rest.models.confetti_potion.confetti_potion(), + theme_color = 56 + ) + else: + return GuildTemplateChannelResponse( + type = 56, + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + template = '', + ) + """ + + def testGuildTemplateChannelResponse(self): + """Test GuildTemplateChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_template_channel_tags.py b/test/test_guild_template_channel_tags.py new file mode 100644 index 0000000..462ee61 --- /dev/null +++ b/test/test_guild_template_channel_tags.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_template_channel_tags import GuildTemplateChannelTags + +class TestGuildTemplateChannelTags(unittest.TestCase): + """GuildTemplateChannelTags unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildTemplateChannelTags: + """Test GuildTemplateChannelTags + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildTemplateChannelTags` + """ + model = GuildTemplateChannelTags() + if include_optional: + return GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True + ) + else: + return GuildTemplateChannelTags( + name = '', + ) + """ + + def testGuildTemplateChannelTags(self): + """Test GuildTemplateChannelTags""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_template_response.py b/test/test_guild_template_response.py new file mode 100644 index 0000000..7c9da88 --- /dev/null +++ b/test/test_guild_template_response.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_template_response import GuildTemplateResponse + +class TestGuildTemplateResponse(unittest.TestCase): + """GuildTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildTemplateResponse: + """Test GuildTemplateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildTemplateResponse` + """ + model = GuildTemplateResponse() + if include_optional: + return GuildTemplateResponse( + code = '', + name = '', + description = '', + usage_count = 56, + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + source_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + serialized_source_guild = dc_rest.models.guild_template_snapshot_response.GuildTemplateSnapshotResponse( + name = '', + description = '', + region = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + afk_timeout = 56, + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56, + roles = [ + dc_rest.models.guild_template_role_response.GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + ], + channels = [ + dc_rest.models.guild_template_channel_response.GuildTemplateChannelResponse( + id = 56, + type = 0, + name = '', + position = 56, + topic = '', + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + default_auto_archive_duration = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + available_tags = [ + dc_rest.models.guild_template_channel_tags.GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ], + template = '', + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 56, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + icon_emoji = dc_rest.models.confetti_potion.confetti_potion(), + theme_color = 56, ) + ], ), + is_dirty = True + ) + else: + return GuildTemplateResponse( + code = '', + name = '', + usage_count = 56, + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + source_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + serialized_source_guild = dc_rest.models.guild_template_snapshot_response.GuildTemplateSnapshotResponse( + name = '', + description = '', + region = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + afk_timeout = 56, + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56, + roles = [ + dc_rest.models.guild_template_role_response.GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + ], + channels = [ + dc_rest.models.guild_template_channel_response.GuildTemplateChannelResponse( + id = 56, + type = 0, + name = '', + position = 56, + topic = '', + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + default_auto_archive_duration = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + available_tags = [ + dc_rest.models.guild_template_channel_tags.GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ], + template = '', + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 56, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + icon_emoji = dc_rest.models.confetti_potion.confetti_potion(), + theme_color = 56, ) + ], ), + ) + """ + + def testGuildTemplateResponse(self): + """Test GuildTemplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_template_role_response.py b/test/test_guild_template_role_response.py new file mode 100644 index 0000000..1331d9f --- /dev/null +++ b/test/test_guild_template_role_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_template_role_response import GuildTemplateRoleResponse + +class TestGuildTemplateRoleResponse(unittest.TestCase): + """GuildTemplateRoleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildTemplateRoleResponse: + """Test GuildTemplateRoleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildTemplateRoleResponse` + """ + model = GuildTemplateRoleResponse() + if include_optional: + return GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '' + ) + else: + return GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + ) + """ + + def testGuildTemplateRoleResponse(self): + """Test GuildTemplateRoleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_template_snapshot_response.py b/test/test_guild_template_snapshot_response.py new file mode 100644 index 0000000..8ddaa77 --- /dev/null +++ b/test/test_guild_template_snapshot_response.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_template_snapshot_response import GuildTemplateSnapshotResponse + +class TestGuildTemplateSnapshotResponse(unittest.TestCase): + """GuildTemplateSnapshotResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildTemplateSnapshotResponse: + """Test GuildTemplateSnapshotResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildTemplateSnapshotResponse` + """ + model = GuildTemplateSnapshotResponse() + if include_optional: + return GuildTemplateSnapshotResponse( + name = '', + description = '', + region = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + afk_timeout = 56, + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56, + roles = [ + dc_rest.models.guild_template_role_response.GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + ], + channels = [ + dc_rest.models.guild_template_channel_response.GuildTemplateChannelResponse( + id = 56, + type = 0, + name = '', + position = 56, + topic = '', + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + default_auto_archive_duration = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + available_tags = [ + dc_rest.models.guild_template_channel_tags.GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ], + template = '', + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 56, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + icon_emoji = dc_rest.models.confetti_potion.confetti_potion(), + theme_color = 56, ) + ] + ) + else: + return GuildTemplateSnapshotResponse( + name = '', + verification_level = 56, + default_message_notifications = 56, + explicit_content_filter = 56, + preferred_locale = '', + afk_timeout = 56, + system_channel_flags = 56, + roles = [ + dc_rest.models.guild_template_role_response.GuildTemplateRoleResponse( + id = 56, + name = '', + permissions = '', + color = 56, + hoist = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + ], + channels = [ + dc_rest.models.guild_template_channel_response.GuildTemplateChannelResponse( + id = 56, + type = 0, + name = '', + position = 56, + topic = '', + bitrate = 56, + user_limit = 56, + nsfw = True, + rate_limit_per_user = 56, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + default_auto_archive_duration = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + available_tags = [ + dc_rest.models.guild_template_channel_tags.GuildTemplateChannelTags( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, ) + ], + template = '', + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 56, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + icon_emoji = dc_rest.models.confetti_potion.confetti_potion(), + theme_color = 56, ) + ], + ) + """ + + def testGuildTemplateSnapshotResponse(self): + """Test GuildTemplateSnapshotResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_welcome_channel.py b/test/test_guild_welcome_channel.py new file mode 100644 index 0000000..e7a5ad6 --- /dev/null +++ b/test/test_guild_welcome_channel.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_welcome_channel import GuildWelcomeChannel + +class TestGuildWelcomeChannel(unittest.TestCase): + """GuildWelcomeChannel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildWelcomeChannel: + """Test GuildWelcomeChannel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildWelcomeChannel` + """ + model = GuildWelcomeChannel() + if include_optional: + return GuildWelcomeChannel( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '0', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '' + ) + else: + return GuildWelcomeChannel( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '0', + ) + """ + + def testGuildWelcomeChannel(self): + """Test GuildWelcomeChannel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_welcome_screen_channel_response.py b/test/test_guild_welcome_screen_channel_response.py new file mode 100644 index 0000000..f908518 --- /dev/null +++ b/test/test_guild_welcome_screen_channel_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_welcome_screen_channel_response import GuildWelcomeScreenChannelResponse + +class TestGuildWelcomeScreenChannelResponse(unittest.TestCase): + """GuildWelcomeScreenChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildWelcomeScreenChannelResponse: + """Test GuildWelcomeScreenChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildWelcomeScreenChannelResponse` + """ + model = GuildWelcomeScreenChannelResponse() + if include_optional: + return GuildWelcomeScreenChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '' + ) + else: + return GuildWelcomeScreenChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '', + ) + """ + + def testGuildWelcomeScreenChannelResponse(self): + """Test GuildWelcomeScreenChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_welcome_screen_response.py b/test/test_guild_welcome_screen_response.py new file mode 100644 index 0000000..80935c1 --- /dev/null +++ b/test/test_guild_welcome_screen_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_welcome_screen_response import GuildWelcomeScreenResponse + +class TestGuildWelcomeScreenResponse(unittest.TestCase): + """GuildWelcomeScreenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildWelcomeScreenResponse: + """Test GuildWelcomeScreenResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildWelcomeScreenResponse` + """ + model = GuildWelcomeScreenResponse() + if include_optional: + return GuildWelcomeScreenResponse( + description = '', + welcome_channels = [ + dc_rest.models.guild_welcome_screen_channel_response.GuildWelcomeScreenChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ] + ) + else: + return GuildWelcomeScreenResponse( + welcome_channels = [ + dc_rest.models.guild_welcome_screen_channel_response.GuildWelcomeScreenChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ], + ) + """ + + def testGuildWelcomeScreenResponse(self): + """Test GuildWelcomeScreenResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_guild_with_counts_response.py b/test/test_guild_with_counts_response.py new file mode 100644 index 0000000..02addea --- /dev/null +++ b/test/test_guild_with_counts_response.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.guild_with_counts_response import GuildWithCountsResponse + +class TestGuildWithCountsResponse(unittest.TestCase): + """GuildWithCountsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GuildWithCountsResponse: + """Test GuildWithCountsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GuildWithCountsResponse` + """ + model = GuildWithCountsResponse() + if include_optional: + return GuildWithCountsResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + home_header = '', + splash = '', + discovery_splash = '', + features = [ + '' + ], + banner = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + region = '', + afk_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + afk_timeout = 56, + system_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + system_channel_flags = 56, + widget_enabled = True, + widget_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + verification_level = 56, + roles = [ + dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + ], + default_message_notifications = 56, + mfa_level = 56, + explicit_content_filter = 56, + max_presences = 56, + max_members = 56, + max_stage_video_channel_users = 56, + max_video_channel_users = 56, + vanity_url_code = '', + premium_tier = 56, + premium_subscription_count = 56, + preferred_locale = '', + rules_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + safety_alerts_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + public_updates_channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + premium_progress_bar_enabled = True, + nsfw = True, + nsfw_level = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ], + approximate_member_count = 56, + approximate_presence_count = 56 + ) + else: + return GuildWithCountsResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + features = [ + '' + ], + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + region = '', + afk_timeout = 56, + system_channel_flags = 56, + widget_enabled = True, + verification_level = 56, + roles = [ + dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + ], + default_message_notifications = 56, + mfa_level = 56, + explicit_content_filter = 56, + premium_tier = 56, + premium_subscription_count = 56, + preferred_locale = '', + premium_progress_bar_enabled = True, + nsfw = True, + nsfw_level = 56, + emojis = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + stickers = [ + dc_rest.models.guild_sticker_response.GuildStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 2, + format_type = 56, + description = '', + available = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ], + ) + """ + + def testGuildWithCountsResponse(self): + """Test GuildWithCountsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_incoming_webhook_interaction_request.py b/test/test_incoming_webhook_interaction_request.py new file mode 100644 index 0000000..8b31a0f --- /dev/null +++ b/test/test_incoming_webhook_interaction_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.incoming_webhook_interaction_request import IncomingWebhookInteractionRequest + +class TestIncomingWebhookInteractionRequest(unittest.TestCase): + """IncomingWebhookInteractionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IncomingWebhookInteractionRequest: + """Test IncomingWebhookInteractionRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IncomingWebhookInteractionRequest` + """ + model = IncomingWebhookInteractionRequest() + if include_optional: + return IncomingWebhookInteractionRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + tts = True, + flags = 56 + ) + else: + return IncomingWebhookInteractionRequest( + ) + """ + + def testIncomingWebhookInteractionRequest(self): + """Test IncomingWebhookInteractionRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_incoming_webhook_request_partial.py b/test/test_incoming_webhook_request_partial.py new file mode 100644 index 0000000..97b1cb0 --- /dev/null +++ b/test/test_incoming_webhook_request_partial.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.incoming_webhook_request_partial import IncomingWebhookRequestPartial + +class TestIncomingWebhookRequestPartial(unittest.TestCase): + """IncomingWebhookRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IncomingWebhookRequestPartial: + """Test IncomingWebhookRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IncomingWebhookRequestPartial` + """ + model = IncomingWebhookRequestPartial() + if include_optional: + return IncomingWebhookRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + tts = True, + flags = 56, + username = '0', + avatar_url = '', + thread_name = '', + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return IncomingWebhookRequestPartial( + ) + """ + + def testIncomingWebhookRequestPartial(self): + """Test IncomingWebhookRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_incoming_webhook_update_for_interaction_callback_request_partial.py b/test/test_incoming_webhook_update_for_interaction_callback_request_partial.py new file mode 100644 index 0000000..cf6eb78 --- /dev/null +++ b/test/test_incoming_webhook_update_for_interaction_callback_request_partial.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial import IncomingWebhookUpdateForInteractionCallbackRequestPartial + +class TestIncomingWebhookUpdateForInteractionCallbackRequestPartial(unittest.TestCase): + """IncomingWebhookUpdateForInteractionCallbackRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IncomingWebhookUpdateForInteractionCallbackRequestPartial: + """Test IncomingWebhookUpdateForInteractionCallbackRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IncomingWebhookUpdateForInteractionCallbackRequestPartial` + """ + model = IncomingWebhookUpdateForInteractionCallbackRequestPartial() + if include_optional: + return IncomingWebhookUpdateForInteractionCallbackRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + flags = 56 + ) + else: + return IncomingWebhookUpdateForInteractionCallbackRequestPartial( + ) + """ + + def testIncomingWebhookUpdateForInteractionCallbackRequestPartial(self): + """Test IncomingWebhookUpdateForInteractionCallbackRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_incoming_webhook_update_request_partial.py b/test/test_incoming_webhook_update_request_partial.py new file mode 100644 index 0000000..4d985df --- /dev/null +++ b/test/test_incoming_webhook_update_request_partial.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.incoming_webhook_update_request_partial import IncomingWebhookUpdateRequestPartial + +class TestIncomingWebhookUpdateRequestPartial(unittest.TestCase): + """IncomingWebhookUpdateRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IncomingWebhookUpdateRequestPartial: + """Test IncomingWebhookUpdateRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IncomingWebhookUpdateRequestPartial` + """ + model = IncomingWebhookUpdateRequestPartial() + if include_optional: + return IncomingWebhookUpdateRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + flags = 56 + ) + else: + return IncomingWebhookUpdateRequestPartial( + ) + """ + + def testIncomingWebhookUpdateRequestPartial(self): + """Test IncomingWebhookUpdateRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inner_errors.py b/test/test_inner_errors.py new file mode 100644 index 0000000..1a08360 --- /dev/null +++ b/test/test_inner_errors.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.inner_errors import InnerErrors + +class TestInnerErrors(unittest.TestCase): + """InnerErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InnerErrors: + """Test InnerErrors + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InnerErrors` + """ + model = InnerErrors() + if include_optional: + return InnerErrors( + errors = [ + dc_rest.models.error.Error( + code = 56, + message = '', ) + ] + ) + else: + return InnerErrors( + errors = [ + dc_rest.models.error.Error( + code = 56, + message = '', ) + ], + ) + """ + + def testInnerErrors(self): + """Test InnerErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_integration_application_response.py b/test/test_integration_application_response.py new file mode 100644 index 0000000..bc75c0b --- /dev/null +++ b/test/test_integration_application_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.integration_application_response import IntegrationApplicationResponse + +class TestIntegrationApplicationResponse(unittest.TestCase): + """IntegrationApplicationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IntegrationApplicationResponse: + """Test IntegrationApplicationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IntegrationApplicationResponse` + """ + model = IntegrationApplicationResponse() + if include_optional: + return IntegrationApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return IntegrationApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + ) + """ + + def testIntegrationApplicationResponse(self): + """Test IntegrationApplicationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_application_command_autocomplete_callback_integer_data.py b/test/test_interaction_application_command_autocomplete_callback_integer_data.py new file mode 100644 index 0000000..ec0c1c1 --- /dev/null +++ b/test/test_interaction_application_command_autocomplete_callback_integer_data.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_application_command_autocomplete_callback_integer_data import InteractionApplicationCommandAutocompleteCallbackIntegerData + +class TestInteractionApplicationCommandAutocompleteCallbackIntegerData(unittest.TestCase): + """InteractionApplicationCommandAutocompleteCallbackIntegerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionApplicationCommandAutocompleteCallbackIntegerData: + """Test InteractionApplicationCommandAutocompleteCallbackIntegerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionApplicationCommandAutocompleteCallbackIntegerData` + """ + model = InteractionApplicationCommandAutocompleteCallbackIntegerData() + if include_optional: + return InteractionApplicationCommandAutocompleteCallbackIntegerData( + choices = [ + dc_rest.models.application_command_option_integer_choice.ApplicationCommandOptionIntegerChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = -9007199254740991, ) + ] + ) + else: + return InteractionApplicationCommandAutocompleteCallbackIntegerData( + ) + """ + + def testInteractionApplicationCommandAutocompleteCallbackIntegerData(self): + """Test InteractionApplicationCommandAutocompleteCallbackIntegerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_application_command_autocomplete_callback_number_data.py b/test/test_interaction_application_command_autocomplete_callback_number_data.py new file mode 100644 index 0000000..f951cee --- /dev/null +++ b/test/test_interaction_application_command_autocomplete_callback_number_data.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_application_command_autocomplete_callback_number_data import InteractionApplicationCommandAutocompleteCallbackNumberData + +class TestInteractionApplicationCommandAutocompleteCallbackNumberData(unittest.TestCase): + """InteractionApplicationCommandAutocompleteCallbackNumberData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionApplicationCommandAutocompleteCallbackNumberData: + """Test InteractionApplicationCommandAutocompleteCallbackNumberData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionApplicationCommandAutocompleteCallbackNumberData` + """ + model = InteractionApplicationCommandAutocompleteCallbackNumberData() + if include_optional: + return InteractionApplicationCommandAutocompleteCallbackNumberData( + choices = [ + dc_rest.models.application_command_option_number_choice.ApplicationCommandOptionNumberChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = 1.337, ) + ] + ) + else: + return InteractionApplicationCommandAutocompleteCallbackNumberData( + ) + """ + + def testInteractionApplicationCommandAutocompleteCallbackNumberData(self): + """Test InteractionApplicationCommandAutocompleteCallbackNumberData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_application_command_autocomplete_callback_string_data.py b/test/test_interaction_application_command_autocomplete_callback_string_data.py new file mode 100644 index 0000000..961dba3 --- /dev/null +++ b/test/test_interaction_application_command_autocomplete_callback_string_data.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_application_command_autocomplete_callback_string_data import InteractionApplicationCommandAutocompleteCallbackStringData + +class TestInteractionApplicationCommandAutocompleteCallbackStringData(unittest.TestCase): + """InteractionApplicationCommandAutocompleteCallbackStringData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionApplicationCommandAutocompleteCallbackStringData: + """Test InteractionApplicationCommandAutocompleteCallbackStringData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionApplicationCommandAutocompleteCallbackStringData` + """ + model = InteractionApplicationCommandAutocompleteCallbackStringData() + if include_optional: + return InteractionApplicationCommandAutocompleteCallbackStringData( + choices = [ + dc_rest.models.application_command_option_string_choice.ApplicationCommandOptionStringChoice( + name = '0', + name_localizations = { + 'key' : '0' + }, + value = '', ) + ] + ) + else: + return InteractionApplicationCommandAutocompleteCallbackStringData( + ) + """ + + def testInteractionApplicationCommandAutocompleteCallbackStringData(self): + """Test InteractionApplicationCommandAutocompleteCallbackStringData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_callback_response.py b/test/test_interaction_callback_response.py new file mode 100644 index 0000000..f557e86 --- /dev/null +++ b/test/test_interaction_callback_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_callback_response import InteractionCallbackResponse + +class TestInteractionCallbackResponse(unittest.TestCase): + """InteractionCallbackResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionCallbackResponse: + """Test InteractionCallbackResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionCallbackResponse` + """ + model = InteractionCallbackResponse() + if include_optional: + return InteractionCallbackResponse( + interaction = dc_rest.models.interaction_response.InteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + response_message_loading = True, + response_message_ephemeral = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + resource = None + ) + else: + return InteractionCallbackResponse( + interaction = dc_rest.models.interaction_response.InteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + response_message_loading = True, + response_message_ephemeral = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + ) + """ + + def testInteractionCallbackResponse(self): + """Test InteractionCallbackResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_callback_response_resource.py b/test/test_interaction_callback_response_resource.py new file mode 100644 index 0000000..3e7060a --- /dev/null +++ b/test/test_interaction_callback_response_resource.py @@ -0,0 +1,852 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_callback_response_resource import InteractionCallbackResponseResource + +class TestInteractionCallbackResponseResource(unittest.TestCase): + """InteractionCallbackResponseResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionCallbackResponseResource: + """Test InteractionCallbackResponseResource + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionCallbackResponseResource` + """ + model = InteractionCallbackResponseResource() + if include_optional: + return InteractionCallbackResponseResource( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse() + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + activity = dc_rest.models.confetti_potion.confetti_potion(), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56, ), ) + ) + else: + return InteractionCallbackResponseResource( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse() + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + activity = dc_rest.models.confetti_potion.confetti_potion(), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56, ), ), + ) + """ + + def testInteractionCallbackResponseResource(self): + """Test InteractionCallbackResponseResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interaction_response.py b/test/test_interaction_response.py new file mode 100644 index 0000000..f9cea98 --- /dev/null +++ b/test/test_interaction_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.interaction_response import InteractionResponse + +class TestInteractionResponse(unittest.TestCase): + """InteractionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InteractionResponse: + """Test InteractionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InteractionResponse` + """ + model = InteractionResponse() + if include_optional: + return InteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + response_message_loading = True, + response_message_ephemeral = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return InteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + ) + """ + + def testInteractionResponse(self): + """Test InteractionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_application_response.py b/test/test_invite_application_response.py new file mode 100644 index 0000000..20237cc --- /dev/null +++ b/test/test_invite_application_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.invite_application_response import InviteApplicationResponse + +class TestInviteApplicationResponse(unittest.TestCase): + """InviteApplicationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteApplicationResponse: + """Test InviteApplicationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteApplicationResponse` + """ + model = InviteApplicationResponse() + if include_optional: + return InviteApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ] + ) + else: + return InviteApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + verify_key = '', + flags = 56, + ) + """ + + def testInviteApplicationResponse(self): + """Test InviteApplicationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_channel_recipient_response.py b/test/test_invite_channel_recipient_response.py new file mode 100644 index 0000000..febea13 --- /dev/null +++ b/test/test_invite_channel_recipient_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.invite_channel_recipient_response import InviteChannelRecipientResponse + +class TestInviteChannelRecipientResponse(unittest.TestCase): + """InviteChannelRecipientResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteChannelRecipientResponse: + """Test InviteChannelRecipientResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteChannelRecipientResponse` + """ + model = InviteChannelRecipientResponse() + if include_optional: + return InviteChannelRecipientResponse( + username = '' + ) + else: + return InviteChannelRecipientResponse( + username = '', + ) + """ + + def testInviteChannelRecipientResponse(self): + """Test InviteChannelRecipientResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_channel_response.py b/test/test_invite_channel_response.py new file mode 100644 index 0000000..715de67 --- /dev/null +++ b/test/test_invite_channel_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.invite_channel_response import InviteChannelResponse + +class TestInviteChannelResponse(unittest.TestCase): + """InviteChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteChannelResponse: + """Test InviteChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteChannelResponse` + """ + model = InviteChannelResponse() + if include_optional: + return InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + icon = '', + recipients = [ + dc_rest.models.invite_channel_recipient_response.InviteChannelRecipientResponse( + username = '', ) + ] + ) + else: + return InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + ) + """ + + def testInviteChannelResponse(self): + """Test InviteChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_guild_response.py b/test/test_invite_guild_response.py new file mode 100644 index 0000000..c924cf0 --- /dev/null +++ b/test/test_invite_guild_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.invite_guild_response import InviteGuildResponse + +class TestInviteGuildResponse(unittest.TestCase): + """InviteGuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteGuildResponse: + """Test InviteGuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteGuildResponse` + """ + model = InviteGuildResponse() + if include_optional: + return InviteGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + splash = '', + banner = '', + description = '', + icon = '', + features = [ + '' + ], + verification_level = 56, + vanity_url_code = '', + nsfw_level = 56, + nsfw = True, + premium_subscription_count = 56 + ) + else: + return InviteGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + features = [ + '' + ], + ) + """ + + def testInviteGuildResponse(self): + """Test InviteGuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_keyword_rule_response.py b/test/test_keyword_rule_response.py new file mode 100644 index 0000000..a4f2ecd --- /dev/null +++ b/test/test_keyword_rule_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.keyword_rule_response import KeywordRuleResponse + +class TestKeywordRuleResponse(unittest.TestCase): + """KeywordRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KeywordRuleResponse: + """Test KeywordRuleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KeywordRuleResponse` + """ + model = KeywordRuleResponse() + if include_optional: + return KeywordRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.keyword_trigger_metadata_response.KeywordTriggerMetadataResponse( + keyword_filter = [ + '' + ], + regex_patterns = [ + '' + ], + allow_list = [ + '' + ], ) + ) + else: + return KeywordRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.keyword_trigger_metadata_response.KeywordTriggerMetadataResponse( + keyword_filter = [ + '' + ], + regex_patterns = [ + '' + ], + allow_list = [ + '' + ], ), + ) + """ + + def testKeywordRuleResponse(self): + """Test KeywordRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_keyword_trigger_metadata.py b/test/test_keyword_trigger_metadata.py new file mode 100644 index 0000000..6be4406 --- /dev/null +++ b/test/test_keyword_trigger_metadata.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.keyword_trigger_metadata import KeywordTriggerMetadata + +class TestKeywordTriggerMetadata(unittest.TestCase): + """KeywordTriggerMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KeywordTriggerMetadata: + """Test KeywordTriggerMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KeywordTriggerMetadata` + """ + model = KeywordTriggerMetadata() + if include_optional: + return KeywordTriggerMetadata( + keyword_filter = [ + '0' + ], + regex_patterns = [ + '0' + ], + allow_list = [ + '0' + ] + ) + else: + return KeywordTriggerMetadata( + ) + """ + + def testKeywordTriggerMetadata(self): + """Test KeywordTriggerMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_keyword_trigger_metadata_response.py b/test/test_keyword_trigger_metadata_response.py new file mode 100644 index 0000000..a4269f4 --- /dev/null +++ b/test/test_keyword_trigger_metadata_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.keyword_trigger_metadata_response import KeywordTriggerMetadataResponse + +class TestKeywordTriggerMetadataResponse(unittest.TestCase): + """KeywordTriggerMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KeywordTriggerMetadataResponse: + """Test KeywordTriggerMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KeywordTriggerMetadataResponse` + """ + model = KeywordTriggerMetadataResponse() + if include_optional: + return KeywordTriggerMetadataResponse( + keyword_filter = [ + '' + ], + regex_patterns = [ + '' + ], + allow_list = [ + '' + ] + ) + else: + return KeywordTriggerMetadataResponse( + keyword_filter = [ + '' + ], + regex_patterns = [ + '' + ], + allow_list = [ + '' + ], + ) + """ + + def testKeywordTriggerMetadataResponse(self): + """Test KeywordTriggerMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_keyword_upsert_request.py b/test/test_keyword_upsert_request.py new file mode 100644 index 0000000..941b465 --- /dev/null +++ b/test/test_keyword_upsert_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.keyword_upsert_request import KeywordUpsertRequest + +class TestKeywordUpsertRequest(unittest.TestCase): + """KeywordUpsertRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KeywordUpsertRequest: + """Test KeywordUpsertRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KeywordUpsertRequest` + """ + model = KeywordUpsertRequest() + if include_optional: + return KeywordUpsertRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.keyword_trigger_metadata.KeywordTriggerMetadata( + keyword_filter = [ + '0' + ], + regex_patterns = [ + '0' + ], + allow_list = [ + '0' + ], ) + ) + else: + return KeywordUpsertRequest( + name = '', + event_type = 56, + trigger_type = 56, + ) + """ + + def testKeywordUpsertRequest(self): + """Test KeywordUpsertRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_keyword_upsert_request_partial.py b/test/test_keyword_upsert_request_partial.py new file mode 100644 index 0000000..81ed9a7 --- /dev/null +++ b/test/test_keyword_upsert_request_partial.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.keyword_upsert_request_partial import KeywordUpsertRequestPartial + +class TestKeywordUpsertRequestPartial(unittest.TestCase): + """KeywordUpsertRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KeywordUpsertRequestPartial: + """Test KeywordUpsertRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KeywordUpsertRequestPartial` + """ + model = KeywordUpsertRequestPartial() + if include_optional: + return KeywordUpsertRequestPartial( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.keyword_trigger_metadata.KeywordTriggerMetadata( + keyword_filter = [ + '0' + ], + regex_patterns = [ + '0' + ], + allow_list = [ + '0' + ], ) + ) + else: + return KeywordUpsertRequestPartial( + ) + """ + + def testKeywordUpsertRequestPartial(self): + """Test KeywordUpsertRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_launch_activity_interaction_callback_request.py b/test/test_launch_activity_interaction_callback_request.py new file mode 100644 index 0000000..bc8cfef --- /dev/null +++ b/test/test_launch_activity_interaction_callback_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.launch_activity_interaction_callback_request import LaunchActivityInteractionCallbackRequest + +class TestLaunchActivityInteractionCallbackRequest(unittest.TestCase): + """LaunchActivityInteractionCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LaunchActivityInteractionCallbackRequest: + """Test LaunchActivityInteractionCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LaunchActivityInteractionCallbackRequest` + """ + model = LaunchActivityInteractionCallbackRequest() + if include_optional: + return LaunchActivityInteractionCallbackRequest( + type = 56 + ) + else: + return LaunchActivityInteractionCallbackRequest( + type = 56, + ) + """ + + def testLaunchActivityInteractionCallbackRequest(self): + """Test LaunchActivityInteractionCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_launch_activity_interaction_callback_response.py b/test/test_launch_activity_interaction_callback_response.py new file mode 100644 index 0000000..3ad11e5 --- /dev/null +++ b/test/test_launch_activity_interaction_callback_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.launch_activity_interaction_callback_response import LaunchActivityInteractionCallbackResponse + +class TestLaunchActivityInteractionCallbackResponse(unittest.TestCase): + """LaunchActivityInteractionCallbackResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LaunchActivityInteractionCallbackResponse: + """Test LaunchActivityInteractionCallbackResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LaunchActivityInteractionCallbackResponse` + """ + model = LaunchActivityInteractionCallbackResponse() + if include_optional: + return LaunchActivityInteractionCallbackResponse( + type = 56 + ) + else: + return LaunchActivityInteractionCallbackResponse( + type = 56, + ) + """ + + def testLaunchActivityInteractionCallbackResponse(self): + """Test LaunchActivityInteractionCallbackResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_application_emojis_response.py b/test/test_list_application_emojis_response.py new file mode 100644 index 0000000..f392706 --- /dev/null +++ b/test/test_list_application_emojis_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_application_emojis_response import ListApplicationEmojisResponse + +class TestListApplicationEmojisResponse(unittest.TestCase): + """ListApplicationEmojisResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListApplicationEmojisResponse: + """Test ListApplicationEmojisResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListApplicationEmojisResponse` + """ + model = ListApplicationEmojisResponse() + if include_optional: + return ListApplicationEmojisResponse( + items = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ] + ) + else: + return ListApplicationEmojisResponse( + items = [ + dc_rest.models.emoji_response.EmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + require_colons = True, + managed = True, + animated = True, + available = True, ) + ], + ) + """ + + def testListApplicationEmojisResponse(self): + """Test ListApplicationEmojisResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_auto_moderation_rules200_response_inner.py b/test/test_list_auto_moderation_rules200_response_inner.py new file mode 100644 index 0000000..7ad3cb1 --- /dev/null +++ b/test/test_list_auto_moderation_rules200_response_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_auto_moderation_rules200_response_inner import ListAutoModerationRules200ResponseInner + +class TestListAutoModerationRules200ResponseInner(unittest.TestCase): + """ListAutoModerationRules200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListAutoModerationRules200ResponseInner: + """Test ListAutoModerationRules200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListAutoModerationRules200ResponseInner` + """ + model = ListAutoModerationRules200ResponseInner() + if include_optional: + return ListAutoModerationRules200ResponseInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return ListAutoModerationRules200ResponseInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testListAutoModerationRules200ResponseInner(self): + """Test ListAutoModerationRules200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_channel_invites200_response_inner.py b/test/test_list_channel_invites200_response_inner.py new file mode 100644 index 0000000..15cbac3 --- /dev/null +++ b/test/test_list_channel_invites200_response_inner.py @@ -0,0 +1,310 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_channel_invites200_response_inner import ListChannelInvites200ResponseInner + +class TestListChannelInvites200ResponseInner(unittest.TestCase): + """ListChannelInvites200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListChannelInvites200ResponseInner: + """Test ListChannelInvites200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListChannelInvites200ResponseInner` + """ + model = ListChannelInvites200ResponseInner() + if include_optional: + return ListChannelInvites200ResponseInner( + type = 56, + code = '', + inviter = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + max_age = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + friends_count = 56, + channel = dc_rest.models.invite_channel_response.InviteChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + icon = '', + recipients = [ + dc_rest.models.invite_channel_recipient_response.InviteChannelRecipientResponse( + username = '', ) + ], ), + is_contact = True, + uses = 56, + max_uses = 56, + flags = 56, + approximate_member_count = 56, + guild = dc_rest.models.invite_guild_response.InviteGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + splash = '', + banner = '', + description = '', + icon = '', + features = [ + '' + ], + verification_level = 56, + vanity_url_code = '', + nsfw_level = 56, + nsfw = True, + premium_subscription_count = 56, ), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_type = 56, + target_user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + target_application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + guild_scheduled_event = dc_rest.models.scheduled_event_response.ScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = null, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ), ), ), + temporary = True, + approximate_presence_count = 56, + is_nickname_changeable = True + ) + else: + return ListChannelInvites200ResponseInner( + code = '', + ) + """ + + def testListChannelInvites200ResponseInner(self): + """Test ListChannelInvites200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_channel_webhooks200_response_inner.py b/test/test_list_channel_webhooks200_response_inner.py new file mode 100644 index 0000000..665ed84 --- /dev/null +++ b/test/test_list_channel_webhooks200_response_inner.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_channel_webhooks200_response_inner import ListChannelWebhooks200ResponseInner + +class TestListChannelWebhooks200ResponseInner(unittest.TestCase): + """ListChannelWebhooks200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListChannelWebhooks200ResponseInner: + """Test ListChannelWebhooks200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListChannelWebhooks200ResponseInner` + """ + model = ListChannelWebhooks200ResponseInner() + if include_optional: + return ListChannelWebhooks200ResponseInner( + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + avatar = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + source_guild = dc_rest.models.webhook_source_guild_response.WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', ), + source_channel = dc_rest.models.webhook_source_channel_response.WebhookSourceChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), + token = '', + url = '' + ) + else: + return ListChannelWebhooks200ResponseInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + ) + """ + + def testListChannelWebhooks200ResponseInner(self): + """Test ListChannelWebhooks200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_guild_integrations200_response_inner.py b/test/test_list_guild_integrations200_response_inner.py new file mode 100644 index 0000000..e436313 --- /dev/null +++ b/test/test_list_guild_integrations200_response_inner.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_guild_integrations200_response_inner import ListGuildIntegrations200ResponseInner + +class TestListGuildIntegrations200ResponseInner(unittest.TestCase): + """ListGuildIntegrations200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGuildIntegrations200ResponseInner: + """Test ListGuildIntegrations200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGuildIntegrations200ResponseInner` + """ + model = ListGuildIntegrations200ResponseInner() + if include_optional: + return ListGuildIntegrations200ResponseInner( + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + enabled = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + scopes = [ + 'applications.commands' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + revoked = True, + expire_behavior = 56, + expire_grace_period = 56, + subscriber_count = 56, + synced_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_id = '9072888001528021798096225500850762068629339333975650685139102691291', + syncing = True, + enable_emoticons = True + ) + else: + return ListGuildIntegrations200ResponseInner( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + scopes = [ + 'applications.commands' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + ) + """ + + def testListGuildIntegrations200ResponseInner(self): + """Test ListGuildIntegrations200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_guild_scheduled_events200_response_inner.py b/test/test_list_guild_scheduled_events200_response_inner.py new file mode 100644 index 0000000..9721d59 --- /dev/null +++ b/test/test_list_guild_scheduled_events200_response_inner.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_guild_scheduled_events200_response_inner import ListGuildScheduledEvents200ResponseInner + +class TestListGuildScheduledEvents200ResponseInner(unittest.TestCase): + """ListGuildScheduledEvents200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGuildScheduledEvents200ResponseInner: + """Test ListGuildScheduledEvents200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGuildScheduledEvents200ResponseInner` + """ + model = ListGuildScheduledEvents200ResponseInner() + if include_optional: + return ListGuildScheduledEvents200ResponseInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = None, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ), ), + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return ListGuildScheduledEvents200ResponseInner( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + privacy_level = None, + entity_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testListGuildScheduledEvents200ResponseInner(self): + """Test ListGuildScheduledEvents200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_guild_soundboard_sounds_response.py b/test/test_list_guild_soundboard_sounds_response.py new file mode 100644 index 0000000..80af018 --- /dev/null +++ b/test/test_list_guild_soundboard_sounds_response.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.list_guild_soundboard_sounds_response import ListGuildSoundboardSoundsResponse + +class TestListGuildSoundboardSoundsResponse(unittest.TestCase): + """ListGuildSoundboardSoundsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListGuildSoundboardSoundsResponse: + """Test ListGuildSoundboardSoundsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListGuildSoundboardSoundsResponse` + """ + model = ListGuildSoundboardSoundsResponse() + if include_optional: + return ListGuildSoundboardSoundsResponse( + items = [ + dc_rest.models.soundboard_sound_response.SoundboardSoundResponse( + name = '', + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + volume = 1.337, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available = True, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ] + ) + else: + return ListGuildSoundboardSoundsResponse( + items = [ + dc_rest.models.soundboard_sound_response.SoundboardSoundResponse( + name = '', + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + volume = 1.337, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available = True, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ) + ], + ) + """ + + def testListGuildSoundboardSoundsResponse(self): + """Test ListGuildSoundboardSoundsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_lobby_member_request.py b/test/test_lobby_member_request.py new file mode 100644 index 0000000..4edc914 --- /dev/null +++ b/test/test_lobby_member_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.lobby_member_request import LobbyMemberRequest + +class TestLobbyMemberRequest(unittest.TestCase): + """LobbyMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LobbyMemberRequest: + """Test LobbyMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LobbyMemberRequest` + """ + model = LobbyMemberRequest() + if include_optional: + return LobbyMemberRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + flags = 1 + ) + else: + return LobbyMemberRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testLobbyMemberRequest(self): + """Test LobbyMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_lobby_member_response.py b/test/test_lobby_member_response.py new file mode 100644 index 0000000..b970ec2 --- /dev/null +++ b/test/test_lobby_member_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.lobby_member_response import LobbyMemberResponse + +class TestLobbyMemberResponse(unittest.TestCase): + """LobbyMemberResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LobbyMemberResponse: + """Test LobbyMemberResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LobbyMemberResponse` + """ + model = LobbyMemberResponse() + if include_optional: + return LobbyMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + flags = 56 + ) + else: + return LobbyMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + ) + """ + + def testLobbyMemberResponse(self): + """Test LobbyMemberResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_lobby_message_response.py b/test/test_lobby_message_response.py new file mode 100644 index 0000000..ba7b76a --- /dev/null +++ b/test/test_lobby_message_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.lobby_message_response import LobbyMessageResponse + +class TestLobbyMessageResponse(unittest.TestCase): + """LobbyMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LobbyMessageResponse: + """Test LobbyMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LobbyMessageResponse` + """ + model = LobbyMessageResponse() + if include_optional: + return LobbyMessageResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + content = '', + lobby_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + metadata = { + 'key' : '' + }, + flags = 56, + application_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return LobbyMessageResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + content = '', + lobby_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + flags = 56, + ) + """ + + def testLobbyMessageResponse(self): + """Test LobbyMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_lobby_response.py b/test/test_lobby_response.py new file mode 100644 index 0000000..c0aeaf3 --- /dev/null +++ b/test/test_lobby_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.lobby_response import LobbyResponse + +class TestLobbyResponse(unittest.TestCase): + """LobbyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LobbyResponse: + """Test LobbyResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LobbyResponse` + """ + model = LobbyResponse() + if include_optional: + return LobbyResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + members = [ + dc_rest.models.lobby_member_response.LobbyMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + metadata = { + 'key' : '' + }, + flags = 56, ) + ], + linked_channel = dc_rest.models.guild_channel_response.GuildChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 0, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + topic = '', + default_auto_archive_duration = 56, + default_thread_rate_limit_per_user = 56, + position = 56, + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_response.ChannelPermissionOverwriteResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = '', + deny = '', ) + ], + nsfw = True, + available_tags = [ + dc_rest.models.forum_tag_response.ForumTagResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + moderated = True, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ], + default_reaction_emoji = dc_rest.models.default_reaction_emoji_response.DefaultReactionEmojiResponse( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + hd_streaming_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + hd_streaming_buyer_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ) + else: + return LobbyResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testLobbyResponse(self): + """Test LobbyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_gallery_component_for_message_request.py b/test/test_media_gallery_component_for_message_request.py new file mode 100644 index 0000000..27f0d64 --- /dev/null +++ b/test/test_media_gallery_component_for_message_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.media_gallery_component_for_message_request import MediaGalleryComponentForMessageRequest + +class TestMediaGalleryComponentForMessageRequest(unittest.TestCase): + """MediaGalleryComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaGalleryComponentForMessageRequest: + """Test MediaGalleryComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaGalleryComponentForMessageRequest` + """ + model = MediaGalleryComponentForMessageRequest() + if include_optional: + return MediaGalleryComponentForMessageRequest( + type = 56, + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ] + ) + else: + return MediaGalleryComponentForMessageRequest( + type = 56, + items = [ + dc_rest.models.media_gallery_item_request.MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), ) + ], + ) + """ + + def testMediaGalleryComponentForMessageRequest(self): + """Test MediaGalleryComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_gallery_component_response.py b/test/test_media_gallery_component_response.py new file mode 100644 index 0000000..bcb34e1 --- /dev/null +++ b/test/test_media_gallery_component_response.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.media_gallery_component_response import MediaGalleryComponentResponse + +class TestMediaGalleryComponentResponse(unittest.TestCase): + """MediaGalleryComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaGalleryComponentResponse: + """Test MediaGalleryComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaGalleryComponentResponse` + """ + model = MediaGalleryComponentResponse() + if include_optional: + return MediaGalleryComponentResponse( + type = 56, + id = 56, + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ] + ) + else: + return MediaGalleryComponentResponse( + type = 56, + id = 56, + items = [ + dc_rest.models.media_gallery_item_response.MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True, ) + ], + ) + """ + + def testMediaGalleryComponentResponse(self): + """Test MediaGalleryComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_gallery_item_request.py b/test/test_media_gallery_item_request.py new file mode 100644 index 0000000..d8be6ae --- /dev/null +++ b/test/test_media_gallery_item_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.media_gallery_item_request import MediaGalleryItemRequest + +class TestMediaGalleryItemRequest(unittest.TestCase): + """MediaGalleryItemRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaGalleryItemRequest: + """Test MediaGalleryItemRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaGalleryItemRequest` + """ + model = MediaGalleryItemRequest() + if include_optional: + return MediaGalleryItemRequest( + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ) + ) + else: + return MediaGalleryItemRequest( + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + ) + """ + + def testMediaGalleryItemRequest(self): + """Test MediaGalleryItemRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_gallery_item_response.py b/test/test_media_gallery_item_response.py new file mode 100644 index 0000000..7077b42 --- /dev/null +++ b/test/test_media_gallery_item_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.media_gallery_item_response import MediaGalleryItemResponse + +class TestMediaGalleryItemResponse(unittest.TestCase): + """MediaGalleryItemResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaGalleryItemResponse: + """Test MediaGalleryItemResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaGalleryItemResponse` + """ + model = MediaGalleryItemResponse() + if include_optional: + return MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True + ) + else: + return MediaGalleryItemResponse( + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + spoiler = True, + ) + """ + + def testMediaGalleryItemResponse(self): + """Test MediaGalleryItemResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mention_spam_rule_response.py b/test/test_mention_spam_rule_response.py new file mode 100644 index 0000000..4469782 --- /dev/null +++ b/test/test_mention_spam_rule_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mention_spam_rule_response import MentionSpamRuleResponse + +class TestMentionSpamRuleResponse(unittest.TestCase): + """MentionSpamRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionSpamRuleResponse: + """Test MentionSpamRuleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionSpamRuleResponse` + """ + model = MentionSpamRuleResponse() + if include_optional: + return MentionSpamRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata_response.MentionSpamTriggerMetadataResponse( + mention_total_limit = 56, + mention_raid_protection_enabled = True, ) + ) + else: + return MentionSpamRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata_response.MentionSpamTriggerMetadataResponse( + mention_total_limit = 56, + mention_raid_protection_enabled = True, ), + ) + """ + + def testMentionSpamRuleResponse(self): + """Test MentionSpamRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mention_spam_trigger_metadata.py b/test/test_mention_spam_trigger_metadata.py new file mode 100644 index 0000000..c39e858 --- /dev/null +++ b/test/test_mention_spam_trigger_metadata.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mention_spam_trigger_metadata import MentionSpamTriggerMetadata + +class TestMentionSpamTriggerMetadata(unittest.TestCase): + """MentionSpamTriggerMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionSpamTriggerMetadata: + """Test MentionSpamTriggerMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionSpamTriggerMetadata` + """ + model = MentionSpamTriggerMetadata() + if include_optional: + return MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True + ) + else: + return MentionSpamTriggerMetadata( + mention_total_limit = 0, + ) + """ + + def testMentionSpamTriggerMetadata(self): + """Test MentionSpamTriggerMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mention_spam_trigger_metadata_response.py b/test/test_mention_spam_trigger_metadata_response.py new file mode 100644 index 0000000..b8333cf --- /dev/null +++ b/test/test_mention_spam_trigger_metadata_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mention_spam_trigger_metadata_response import MentionSpamTriggerMetadataResponse + +class TestMentionSpamTriggerMetadataResponse(unittest.TestCase): + """MentionSpamTriggerMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionSpamTriggerMetadataResponse: + """Test MentionSpamTriggerMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionSpamTriggerMetadataResponse` + """ + model = MentionSpamTriggerMetadataResponse() + if include_optional: + return MentionSpamTriggerMetadataResponse( + mention_total_limit = 56, + mention_raid_protection_enabled = True + ) + else: + return MentionSpamTriggerMetadataResponse( + mention_total_limit = 56, + ) + """ + + def testMentionSpamTriggerMetadataResponse(self): + """Test MentionSpamTriggerMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mention_spam_upsert_request.py b/test/test_mention_spam_upsert_request.py new file mode 100644 index 0000000..8d6c95c --- /dev/null +++ b/test/test_mention_spam_upsert_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mention_spam_upsert_request import MentionSpamUpsertRequest + +class TestMentionSpamUpsertRequest(unittest.TestCase): + """MentionSpamUpsertRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionSpamUpsertRequest: + """Test MentionSpamUpsertRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionSpamUpsertRequest` + """ + model = MentionSpamUpsertRequest() + if include_optional: + return MentionSpamUpsertRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata.MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True, ) + ) + else: + return MentionSpamUpsertRequest( + name = '', + event_type = 56, + trigger_type = 56, + ) + """ + + def testMentionSpamUpsertRequest(self): + """Test MentionSpamUpsertRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mention_spam_upsert_request_partial.py b/test/test_mention_spam_upsert_request_partial.py new file mode 100644 index 0000000..4b24428 --- /dev/null +++ b/test/test_mention_spam_upsert_request_partial.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mention_spam_upsert_request_partial import MentionSpamUpsertRequestPartial + +class TestMentionSpamUpsertRequestPartial(unittest.TestCase): + """MentionSpamUpsertRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionSpamUpsertRequestPartial: + """Test MentionSpamUpsertRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionSpamUpsertRequestPartial` + """ + model = MentionSpamUpsertRequestPartial() + if include_optional: + return MentionSpamUpsertRequestPartial( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata.MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True, ) + ) + else: + return MentionSpamUpsertRequestPartial( + ) + """ + + def testMentionSpamUpsertRequestPartial(self): + """Test MentionSpamUpsertRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mentionable_select_component_for_message_request.py b/test/test_mentionable_select_component_for_message_request.py new file mode 100644 index 0000000..7356ac1 --- /dev/null +++ b/test/test_mentionable_select_component_for_message_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mentionable_select_component_for_message_request import MentionableSelectComponentForMessageRequest + +class TestMentionableSelectComponentForMessageRequest(unittest.TestCase): + """MentionableSelectComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionableSelectComponentForMessageRequest: + """Test MentionableSelectComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionableSelectComponentForMessageRequest` + """ + model = MentionableSelectComponentForMessageRequest() + if include_optional: + return MentionableSelectComponentForMessageRequest( + type = 56, + custom_id = '', + placeholder = '', + min_values = 0, + max_values = 1, + disabled = True, + default_values = [ + null + ] + ) + else: + return MentionableSelectComponentForMessageRequest( + type = 56, + custom_id = '', + ) + """ + + def testMentionableSelectComponentForMessageRequest(self): + """Test MentionableSelectComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mentionable_select_component_for_message_request_default_values_inner.py b/test/test_mentionable_select_component_for_message_request_default_values_inner.py new file mode 100644 index 0000000..f00b2e4 --- /dev/null +++ b/test/test_mentionable_select_component_for_message_request_default_values_inner.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mentionable_select_component_for_message_request_default_values_inner import MentionableSelectComponentForMessageRequestDefaultValuesInner + +class TestMentionableSelectComponentForMessageRequestDefaultValuesInner(unittest.TestCase): + """MentionableSelectComponentForMessageRequestDefaultValuesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionableSelectComponentForMessageRequestDefaultValuesInner: + """Test MentionableSelectComponentForMessageRequestDefaultValuesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionableSelectComponentForMessageRequestDefaultValuesInner` + """ + model = MentionableSelectComponentForMessageRequestDefaultValuesInner() + if include_optional: + return MentionableSelectComponentForMessageRequestDefaultValuesInner( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return MentionableSelectComponentForMessageRequestDefaultValuesInner( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMentionableSelectComponentForMessageRequestDefaultValuesInner(self): + """Test MentionableSelectComponentForMessageRequestDefaultValuesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mentionable_select_component_response.py b/test/test_mentionable_select_component_response.py new file mode 100644 index 0000000..0c71937 --- /dev/null +++ b/test/test_mentionable_select_component_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mentionable_select_component_response import MentionableSelectComponentResponse + +class TestMentionableSelectComponentResponse(unittest.TestCase): + """MentionableSelectComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionableSelectComponentResponse: + """Test MentionableSelectComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionableSelectComponentResponse` + """ + model = MentionableSelectComponentResponse() + if include_optional: + return MentionableSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + placeholder = '', + min_values = 56, + max_values = 56, + disabled = True, + default_values = [ + null + ] + ) + else: + return MentionableSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + ) + """ + + def testMentionableSelectComponentResponse(self): + """Test MentionableSelectComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mentionable_select_component_response_default_values_inner.py b/test/test_mentionable_select_component_response_default_values_inner.py new file mode 100644 index 0000000..5bf27ef --- /dev/null +++ b/test/test_mentionable_select_component_response_default_values_inner.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.mentionable_select_component_response_default_values_inner import MentionableSelectComponentResponseDefaultValuesInner + +class TestMentionableSelectComponentResponseDefaultValuesInner(unittest.TestCase): + """MentionableSelectComponentResponseDefaultValuesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MentionableSelectComponentResponseDefaultValuesInner: + """Test MentionableSelectComponentResponseDefaultValuesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MentionableSelectComponentResponseDefaultValuesInner` + """ + model = MentionableSelectComponentResponseDefaultValuesInner() + if include_optional: + return MentionableSelectComponentResponseDefaultValuesInner( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return MentionableSelectComponentResponseDefaultValuesInner( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMentionableSelectComponentResponseDefaultValuesInner(self): + """Test MentionableSelectComponentResponseDefaultValuesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_allowed_mentions_request.py b/test/test_message_allowed_mentions_request.py new file mode 100644 index 0000000..5422c8f --- /dev/null +++ b/test/test_message_allowed_mentions_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_allowed_mentions_request import MessageAllowedMentionsRequest + +class TestMessageAllowedMentionsRequest(unittest.TestCase): + """MessageAllowedMentionsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageAllowedMentionsRequest: + """Test MessageAllowedMentionsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageAllowedMentionsRequest` + """ + model = MessageAllowedMentionsRequest() + if include_optional: + return MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True + ) + else: + return MessageAllowedMentionsRequest( + ) + """ + + def testMessageAllowedMentionsRequest(self): + """Test MessageAllowedMentionsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_attachment_request.py b/test/test_message_attachment_request.py new file mode 100644 index 0000000..98b5a46 --- /dev/null +++ b/test/test_message_attachment_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_attachment_request import MessageAttachmentRequest + +class TestMessageAttachmentRequest(unittest.TestCase): + """MessageAttachmentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageAttachmentRequest: + """Test MessageAttachmentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageAttachmentRequest` + """ + model = MessageAttachmentRequest() + if include_optional: + return MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True + ) + else: + return MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMessageAttachmentRequest(self): + """Test MessageAttachmentRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_attachment_response.py b/test/test_message_attachment_response.py new file mode 100644 index 0000000..70e985e --- /dev/null +++ b/test/test_message_attachment_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_attachment_response import MessageAttachmentResponse + +class TestMessageAttachmentResponse(unittest.TestCase): + """MessageAttachmentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageAttachmentResponse: + """Test MessageAttachmentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageAttachmentResponse` + """ + model = MessageAttachmentResponse() + if include_optional: + return MessageAttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ] + ) + else: + return MessageAttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + ) + """ + + def testMessageAttachmentResponse(self): + """Test MessageAttachmentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_call_response.py b/test/test_message_call_response.py new file mode 100644 index 0000000..79c0ab4 --- /dev/null +++ b/test/test_message_call_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_call_response import MessageCallResponse + +class TestMessageCallResponse(unittest.TestCase): + """MessageCallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageCallResponse: + """Test MessageCallResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageCallResponse` + """ + model = MessageCallResponse() + if include_optional: + return MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return MessageCallResponse( + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testMessageCallResponse(self): + """Test MessageCallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_component_interaction_metadata_response.py b/test/test_message_component_interaction_metadata_response.py new file mode 100644 index 0000000..78bd7b1 --- /dev/null +++ b/test/test_message_component_interaction_metadata_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_component_interaction_metadata_response import MessageComponentInteractionMetadataResponse + +class TestMessageComponentInteractionMetadataResponse(unittest.TestCase): + """MessageComponentInteractionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageComponentInteractionMetadataResponse: + """Test MessageComponentInteractionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageComponentInteractionMetadataResponse` + """ + model = MessageComponentInteractionMetadataResponse() + if include_optional: + return MessageComponentInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + original_response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return MessageComponentInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMessageComponentInteractionMetadataResponse(self): + """Test MessageComponentInteractionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_create_request.py b/test/test_message_create_request.py new file mode 100644 index 0000000..1bfbfdf --- /dev/null +++ b/test/test_message_create_request.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_create_request import MessageCreateRequest + +class TestMessageCreateRequest(unittest.TestCase): + """MessageCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageCreateRequest: + """Test MessageCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageCreateRequest` + """ + model = MessageCreateRequest() + if include_optional: + return MessageCreateRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), + message_reference = dc_rest.models.message_reference_request.MessageReferenceRequest( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + fail_if_not_exists = True, + type = null, ), + nonce = None, + enforce_nonce = True, + tts = True + ) + else: + return MessageCreateRequest( + ) + """ + + def testMessageCreateRequest(self): + """Test MessageCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_edit_request_partial.py b/test/test_message_edit_request_partial.py new file mode 100644 index 0000000..aef93c1 --- /dev/null +++ b/test/test_message_edit_request_partial.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_edit_request_partial import MessageEditRequestPartial + +class TestMessageEditRequestPartial(unittest.TestCase): + """MessageEditRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEditRequestPartial: + """Test MessageEditRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEditRequestPartial` + """ + model = MessageEditRequestPartial() + if include_optional: + return MessageEditRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + flags = 56, + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ] + ) + else: + return MessageEditRequestPartial( + ) + """ + + def testMessageEditRequestPartial(self): + """Test MessageEditRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_author_response.py b/test/test_message_embed_author_response.py new file mode 100644 index 0000000..3455049 --- /dev/null +++ b/test/test_message_embed_author_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_author_response import MessageEmbedAuthorResponse + +class TestMessageEmbedAuthorResponse(unittest.TestCase): + """MessageEmbedAuthorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedAuthorResponse: + """Test MessageEmbedAuthorResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedAuthorResponse` + """ + model = MessageEmbedAuthorResponse() + if include_optional: + return MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '' + ) + else: + return MessageEmbedAuthorResponse( + name = '', + ) + """ + + def testMessageEmbedAuthorResponse(self): + """Test MessageEmbedAuthorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_field_response.py b/test/test_message_embed_field_response.py new file mode 100644 index 0000000..3e279e0 --- /dev/null +++ b/test/test_message_embed_field_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_field_response import MessageEmbedFieldResponse + +class TestMessageEmbedFieldResponse(unittest.TestCase): + """MessageEmbedFieldResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedFieldResponse: + """Test MessageEmbedFieldResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedFieldResponse` + """ + model = MessageEmbedFieldResponse() + if include_optional: + return MessageEmbedFieldResponse( + name = '', + value = '', + inline = True + ) + else: + return MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, + ) + """ + + def testMessageEmbedFieldResponse(self): + """Test MessageEmbedFieldResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_footer_response.py b/test/test_message_embed_footer_response.py new file mode 100644 index 0000000..67306f1 --- /dev/null +++ b/test/test_message_embed_footer_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_footer_response import MessageEmbedFooterResponse + +class TestMessageEmbedFooterResponse(unittest.TestCase): + """MessageEmbedFooterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedFooterResponse: + """Test MessageEmbedFooterResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedFooterResponse` + """ + model = MessageEmbedFooterResponse() + if include_optional: + return MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '' + ) + else: + return MessageEmbedFooterResponse( + text = '', + ) + """ + + def testMessageEmbedFooterResponse(self): + """Test MessageEmbedFooterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_image_response.py b/test/test_message_embed_image_response.py new file mode 100644 index 0000000..913ebea --- /dev/null +++ b/test/test_message_embed_image_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_image_response import MessageEmbedImageResponse + +class TestMessageEmbedImageResponse(unittest.TestCase): + """MessageEmbedImageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedImageResponse: + """Test MessageEmbedImageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedImageResponse` + """ + model = MessageEmbedImageResponse() + if include_optional: + return MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0 + ) + else: + return MessageEmbedImageResponse( + ) + """ + + def testMessageEmbedImageResponse(self): + """Test MessageEmbedImageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_provider_response.py b/test/test_message_embed_provider_response.py new file mode 100644 index 0000000..9941770 --- /dev/null +++ b/test/test_message_embed_provider_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_provider_response import MessageEmbedProviderResponse + +class TestMessageEmbedProviderResponse(unittest.TestCase): + """MessageEmbedProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedProviderResponse: + """Test MessageEmbedProviderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedProviderResponse` + """ + model = MessageEmbedProviderResponse() + if include_optional: + return MessageEmbedProviderResponse( + name = '', + url = '' + ) + else: + return MessageEmbedProviderResponse( + name = '', + ) + """ + + def testMessageEmbedProviderResponse(self): + """Test MessageEmbedProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_response.py b/test/test_message_embed_response.py new file mode 100644 index 0000000..55a9aa3 --- /dev/null +++ b/test/test_message_embed_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_response import MessageEmbedResponse + +class TestMessageEmbedResponse(unittest.TestCase): + """MessageEmbedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedResponse: + """Test MessageEmbedResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedResponse` + """ + model = MessageEmbedResponse() + if include_optional: + return MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ) + ) + else: + return MessageEmbedResponse( + type = '', + ) + """ + + def testMessageEmbedResponse(self): + """Test MessageEmbedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_embed_video_response.py b/test/test_message_embed_video_response.py new file mode 100644 index 0000000..dc3d67e --- /dev/null +++ b/test/test_message_embed_video_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_embed_video_response import MessageEmbedVideoResponse + +class TestMessageEmbedVideoResponse(unittest.TestCase): + """MessageEmbedVideoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageEmbedVideoResponse: + """Test MessageEmbedVideoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageEmbedVideoResponse` + """ + model = MessageEmbedVideoResponse() + if include_optional: + return MessageEmbedVideoResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0 + ) + else: + return MessageEmbedVideoResponse( + ) + """ + + def testMessageEmbedVideoResponse(self): + """Test MessageEmbedVideoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_interaction_response.py b/test/test_message_interaction_response.py new file mode 100644 index 0000000..8eb3823 --- /dev/null +++ b/test/test_message_interaction_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_interaction_response import MessageInteractionResponse + +class TestMessageInteractionResponse(unittest.TestCase): + """MessageInteractionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageInteractionResponse: + """Test MessageInteractionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageInteractionResponse` + """ + model = MessageInteractionResponse() + if include_optional: + return MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + name_localized = '' + ) + else: + return MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + ) + """ + + def testMessageInteractionResponse(self): + """Test MessageInteractionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_mention_channel_response.py b/test/test_message_mention_channel_response.py new file mode 100644 index 0000000..8aec65d --- /dev/null +++ b/test/test_message_mention_channel_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_mention_channel_response import MessageMentionChannelResponse + +class TestMessageMentionChannelResponse(unittest.TestCase): + """MessageMentionChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageMentionChannelResponse: + """Test MessageMentionChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageMentionChannelResponse` + """ + model = MessageMentionChannelResponse() + if include_optional: + return MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMessageMentionChannelResponse(self): + """Test MessageMentionChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_reaction_count_details_response.py b/test/test_message_reaction_count_details_response.py new file mode 100644 index 0000000..ecc5407 --- /dev/null +++ b/test/test_message_reaction_count_details_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_reaction_count_details_response import MessageReactionCountDetailsResponse + +class TestMessageReactionCountDetailsResponse(unittest.TestCase): + """MessageReactionCountDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageReactionCountDetailsResponse: + """Test MessageReactionCountDetailsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageReactionCountDetailsResponse` + """ + model = MessageReactionCountDetailsResponse() + if include_optional: + return MessageReactionCountDetailsResponse( + burst = 56, + normal = 56 + ) + else: + return MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, + ) + """ + + def testMessageReactionCountDetailsResponse(self): + """Test MessageReactionCountDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_reaction_emoji_response.py b/test/test_message_reaction_emoji_response.py new file mode 100644 index 0000000..29a9f97 --- /dev/null +++ b/test/test_message_reaction_emoji_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_reaction_emoji_response import MessageReactionEmojiResponse + +class TestMessageReactionEmojiResponse(unittest.TestCase): + """MessageReactionEmojiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageReactionEmojiResponse: + """Test MessageReactionEmojiResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageReactionEmojiResponse` + """ + model = MessageReactionEmojiResponse() + if include_optional: + return MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True + ) + else: + return MessageReactionEmojiResponse( + ) + """ + + def testMessageReactionEmojiResponse(self): + """Test MessageReactionEmojiResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_reaction_response.py b/test/test_message_reaction_response.py new file mode 100644 index 0000000..85c557f --- /dev/null +++ b/test/test_message_reaction_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_reaction_response import MessageReactionResponse + +class TestMessageReactionResponse(unittest.TestCase): + """MessageReactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageReactionResponse: + """Test MessageReactionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageReactionResponse` + """ + model = MessageReactionResponse() + if include_optional: + return MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True + ) + else: + return MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, + ) + """ + + def testMessageReactionResponse(self): + """Test MessageReactionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_reference_request.py b/test/test_message_reference_request.py new file mode 100644 index 0000000..75721b0 --- /dev/null +++ b/test/test_message_reference_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_reference_request import MessageReferenceRequest + +class TestMessageReferenceRequest(unittest.TestCase): + """MessageReferenceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageReferenceRequest: + """Test MessageReferenceRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageReferenceRequest` + """ + model = MessageReferenceRequest() + if include_optional: + return MessageReferenceRequest( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + fail_if_not_exists = True, + type = None + ) + else: + return MessageReferenceRequest( + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMessageReferenceRequest(self): + """Test MessageReferenceRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_reference_response.py b/test/test_message_reference_response.py new file mode 100644 index 0000000..1583295 --- /dev/null +++ b/test/test_message_reference_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_reference_response import MessageReferenceResponse + +class TestMessageReferenceResponse(unittest.TestCase): + """MessageReferenceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageReferenceResponse: + """Test MessageReferenceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageReferenceResponse` + """ + model = MessageReferenceResponse() + if include_optional: + return MessageReferenceResponse( + type = None, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testMessageReferenceResponse(self): + """Test MessageReferenceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_response.py b/test/test_message_response.py new file mode 100644 index 0000000..f3c6f87 --- /dev/null +++ b/test/test_message_response.py @@ -0,0 +1,1310 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_response import MessageResponse + +class TestMessageResponse(unittest.TestCase): + """MessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageResponse: + """Test MessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageResponse` + """ + model = MessageResponse() + if include_optional: + return MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + name_localized = '', ), + nonce = None, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = None, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], ) + ) + else: + return MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + pinned = True, + mention_everyone = True, + tts = True, + ) + """ + + def testMessageResponse(self): + """Test MessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_role_subscription_data_response.py b/test/test_message_role_subscription_data_response.py new file mode 100644 index 0000000..8b0d1aa --- /dev/null +++ b/test/test_message_role_subscription_data_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_role_subscription_data_response import MessageRoleSubscriptionDataResponse + +class TestMessageRoleSubscriptionDataResponse(unittest.TestCase): + """MessageRoleSubscriptionDataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageRoleSubscriptionDataResponse: + """Test MessageRoleSubscriptionDataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageRoleSubscriptionDataResponse` + """ + model = MessageRoleSubscriptionDataResponse() + if include_optional: + return MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True + ) + else: + return MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, + ) + """ + + def testMessageRoleSubscriptionDataResponse(self): + """Test MessageRoleSubscriptionDataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_snapshot_response.py b/test/test_message_snapshot_response.py new file mode 100644 index 0000000..d2fd620 --- /dev/null +++ b/test/test_message_snapshot_response.py @@ -0,0 +1,283 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_snapshot_response import MessageSnapshotResponse + +class TestMessageSnapshotResponse(unittest.TestCase): + """MessageSnapshotResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageSnapshotResponse: + """Test MessageSnapshotResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageSnapshotResponse` + """ + model = MessageSnapshotResponse() + if include_optional: + return MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], ) + ) + else: + return MessageSnapshotResponse( + ) + """ + + def testMessageSnapshotResponse(self): + """Test MessageSnapshotResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_sticker_item_response.py b/test/test_message_sticker_item_response.py new file mode 100644 index 0000000..0f49264 --- /dev/null +++ b/test/test_message_sticker_item_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.message_sticker_item_response import MessageStickerItemResponse + +class TestMessageStickerItemResponse(unittest.TestCase): + """MessageStickerItemResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageStickerItemResponse: + """Test MessageStickerItemResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageStickerItemResponse` + """ + model = MessageStickerItemResponse() + if include_optional: + return MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56 + ) + else: + return MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, + ) + """ + + def testMessageStickerItemResponse(self): + """Test MessageStickerItemResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_minimal_content_message_response.py b/test/test_minimal_content_message_response.py new file mode 100644 index 0000000..a491e04 --- /dev/null +++ b/test/test_minimal_content_message_response.py @@ -0,0 +1,526 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.minimal_content_message_response import MinimalContentMessageResponse + +class TestMinimalContentMessageResponse(unittest.TestCase): + """MinimalContentMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MinimalContentMessageResponse: + """Test MinimalContentMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MinimalContentMessageResponse` + """ + model = MinimalContentMessageResponse() + if include_optional: + return MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ] + ) + else: + return MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ) + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', + flags = 0, ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + ) + """ + + def testMinimalContentMessageResponse(self): + """Test MinimalContentMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ml_spam_rule_response.py b/test/test_ml_spam_rule_response.py new file mode 100644 index 0000000..e96e21b --- /dev/null +++ b/test/test_ml_spam_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.ml_spam_rule_response import MLSpamRuleResponse + +class TestMLSpamRuleResponse(unittest.TestCase): + """MLSpamRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MLSpamRuleResponse: + """Test MLSpamRuleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MLSpamRuleResponse` + """ + model = MLSpamRuleResponse() + if include_optional: + return MLSpamRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return MLSpamRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testMLSpamRuleResponse(self): + """Test MLSpamRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ml_spam_upsert_request.py b/test/test_ml_spam_upsert_request.py new file mode 100644 index 0000000..47bea02 --- /dev/null +++ b/test/test_ml_spam_upsert_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.ml_spam_upsert_request import MLSpamUpsertRequest + +class TestMLSpamUpsertRequest(unittest.TestCase): + """MLSpamUpsertRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MLSpamUpsertRequest: + """Test MLSpamUpsertRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MLSpamUpsertRequest` + """ + model = MLSpamUpsertRequest() + if include_optional: + return MLSpamUpsertRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return MLSpamUpsertRequest( + name = '', + event_type = 56, + trigger_type = 56, + ) + """ + + def testMLSpamUpsertRequest(self): + """Test MLSpamUpsertRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ml_spam_upsert_request_partial.py b/test/test_ml_spam_upsert_request_partial.py new file mode 100644 index 0000000..c391811 --- /dev/null +++ b/test/test_ml_spam_upsert_request_partial.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.ml_spam_upsert_request_partial import MLSpamUpsertRequestPartial + +class TestMLSpamUpsertRequestPartial(unittest.TestCase): + """MLSpamUpsertRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MLSpamUpsertRequestPartial: + """Test MLSpamUpsertRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MLSpamUpsertRequestPartial` + """ + model = MLSpamUpsertRequestPartial() + if include_optional: + return MLSpamUpsertRequestPartial( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return MLSpamUpsertRequestPartial( + ) + """ + + def testMLSpamUpsertRequestPartial(self): + """Test MLSpamUpsertRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_modal_interaction_callback_request.py b/test/test_modal_interaction_callback_request.py new file mode 100644 index 0000000..3687531 --- /dev/null +++ b/test/test_modal_interaction_callback_request.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.modal_interaction_callback_request import ModalInteractionCallbackRequest + +class TestModalInteractionCallbackRequest(unittest.TestCase): + """ModalInteractionCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModalInteractionCallbackRequest: + """Test ModalInteractionCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModalInteractionCallbackRequest` + """ + model = ModalInteractionCallbackRequest() + if include_optional: + return ModalInteractionCallbackRequest( + type = 56, + data = dc_rest.models.modal_interaction_callback_request_data.ModalInteractionCallbackRequestData( + custom_id = '', + title = '', + components = [ + dc_rest.models.action_row_component_for_modal_request.ActionRowComponentForModalRequest( + type = 1, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ], ) + ], ) + ) + else: + return ModalInteractionCallbackRequest( + type = 56, + data = dc_rest.models.modal_interaction_callback_request_data.ModalInteractionCallbackRequestData( + custom_id = '', + title = '', + components = [ + dc_rest.models.action_row_component_for_modal_request.ActionRowComponentForModalRequest( + type = 1, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ], ) + ], ), + ) + """ + + def testModalInteractionCallbackRequest(self): + """Test ModalInteractionCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_modal_interaction_callback_request_data.py b/test/test_modal_interaction_callback_request_data.py new file mode 100644 index 0000000..76b2697 --- /dev/null +++ b/test/test_modal_interaction_callback_request_data.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.modal_interaction_callback_request_data import ModalInteractionCallbackRequestData + +class TestModalInteractionCallbackRequestData(unittest.TestCase): + """ModalInteractionCallbackRequestData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModalInteractionCallbackRequestData: + """Test ModalInteractionCallbackRequestData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModalInteractionCallbackRequestData` + """ + model = ModalInteractionCallbackRequestData() + if include_optional: + return ModalInteractionCallbackRequestData( + custom_id = '', + title = '', + components = [ + dc_rest.models.action_row_component_for_modal_request.ActionRowComponentForModalRequest( + type = 1, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ], ) + ] + ) + else: + return ModalInteractionCallbackRequestData( + custom_id = '', + title = '', + components = [ + dc_rest.models.action_row_component_for_modal_request.ActionRowComponentForModalRequest( + type = 1, + components = [ + dc_rest.models.text_input_component_for_modal_request.TextInputComponentForModalRequest( + type = 4, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1, ) + ], ) + ], + ) + """ + + def testModalInteractionCallbackRequestData(self): + """Test ModalInteractionCallbackRequestData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_modal_submit_interaction_metadata_response.py b/test/test_modal_submit_interaction_metadata_response.py new file mode 100644 index 0000000..45e93ab --- /dev/null +++ b/test/test_modal_submit_interaction_metadata_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.modal_submit_interaction_metadata_response import ModalSubmitInteractionMetadataResponse + +class TestModalSubmitInteractionMetadataResponse(unittest.TestCase): + """ModalSubmitInteractionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModalSubmitInteractionMetadataResponse: + """Test ModalSubmitInteractionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModalSubmitInteractionMetadataResponse` + """ + model = ModalSubmitInteractionMetadataResponse() + if include_optional: + return ModalSubmitInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + original_response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + triggering_interaction_metadata = None + ) + else: + return ModalSubmitInteractionMetadataResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + triggering_interaction_metadata = None, + ) + """ + + def testModalSubmitInteractionMetadataResponse(self): + """Test ModalSubmitInteractionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_modal_submit_interaction_metadata_response_triggering_interaction_metadata.py b/test/test_modal_submit_interaction_metadata_response_triggering_interaction_metadata.py new file mode 100644 index 0000000..1a39ba1 --- /dev/null +++ b/test/test_modal_submit_interaction_metadata_response_triggering_interaction_metadata.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.modal_submit_interaction_metadata_response_triggering_interaction_metadata import ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + +class TestModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata(unittest.TestCase): + """ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata: + """Test ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata` + """ + model = ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata() + if include_optional: + return ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + original_response_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + target_user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + target_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + authorizing_integration_owners = { + 'key' : '9072888001528021798096225500850762068629339333975650685139102691291' + }, + interacted_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata(self): + """Test ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_my_guild_response.py b/test/test_my_guild_response.py new file mode 100644 index 0000000..0722511 --- /dev/null +++ b/test/test_my_guild_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.my_guild_response import MyGuildResponse + +class TestMyGuildResponse(unittest.TestCase): + """MyGuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MyGuildResponse: + """Test MyGuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MyGuildResponse` + """ + model = MyGuildResponse() + if include_optional: + return MyGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + banner = '', + owner = True, + permissions = '', + features = [ + '' + ], + approximate_member_count = 56, + approximate_presence_count = 56 + ) + else: + return MyGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + owner = True, + permissions = '', + features = [ + '' + ], + ) + """ + + def testMyGuildResponse(self): + """Test MyGuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_new_member_action_response.py b/test/test_new_member_action_response.py new file mode 100644 index 0000000..3c05acb --- /dev/null +++ b/test/test_new_member_action_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.new_member_action_response import NewMemberActionResponse + +class TestNewMemberActionResponse(unittest.TestCase): + """NewMemberActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NewMemberActionResponse: + """Test NewMemberActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NewMemberActionResponse` + """ + model = NewMemberActionResponse() + if include_optional: + return NewMemberActionResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + icon = '' + ) + else: + return NewMemberActionResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + action_type = 56, + title = '', + description = '', + ) + """ + + def testNewMemberActionResponse(self): + """Test NewMemberActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_get_authorization_response.py b/test/test_o_auth2_get_authorization_response.py new file mode 100644 index 0000000..c90bcff --- /dev/null +++ b/test/test_o_auth2_get_authorization_response.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.o_auth2_get_authorization_response import OAuth2GetAuthorizationResponse + +class TestOAuth2GetAuthorizationResponse(unittest.TestCase): + """OAuth2GetAuthorizationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2GetAuthorizationResponse: + """Test OAuth2GetAuthorizationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2GetAuthorizationResponse` + """ + model = OAuth2GetAuthorizationResponse() + if include_optional: + return OAuth2GetAuthorizationResponse( + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + expires = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scopes = [ + '' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return OAuth2GetAuthorizationResponse( + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + expires = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scopes = [ + '' + ], + ) + """ + + def testOAuth2GetAuthorizationResponse(self): + """Test OAuth2GetAuthorizationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_get_keys.py b/test/test_o_auth2_get_keys.py new file mode 100644 index 0000000..3f815f0 --- /dev/null +++ b/test/test_o_auth2_get_keys.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.o_auth2_get_keys import OAuth2GetKeys + +class TestOAuth2GetKeys(unittest.TestCase): + """OAuth2GetKeys unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2GetKeys: + """Test OAuth2GetKeys + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2GetKeys` + """ + model = OAuth2GetKeys() + if include_optional: + return OAuth2GetKeys( + keys = [ + dc_rest.models.o_auth2_key.OAuth2Key( + kty = '', + use = '', + kid = '', + n = '', + e = '', + alg = '', ) + ] + ) + else: + return OAuth2GetKeys( + keys = [ + dc_rest.models.o_auth2_key.OAuth2Key( + kty = '', + use = '', + kid = '', + n = '', + e = '', + alg = '', ) + ], + ) + """ + + def testOAuth2GetKeys(self): + """Test OAuth2GetKeys""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_get_open_id_connect_user_info_response.py b/test/test_o_auth2_get_open_id_connect_user_info_response.py new file mode 100644 index 0000000..b88be23 --- /dev/null +++ b/test/test_o_auth2_get_open_id_connect_user_info_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.o_auth2_get_open_id_connect_user_info_response import OAuth2GetOpenIDConnectUserInfoResponse + +class TestOAuth2GetOpenIDConnectUserInfoResponse(unittest.TestCase): + """OAuth2GetOpenIDConnectUserInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2GetOpenIDConnectUserInfoResponse: + """Test OAuth2GetOpenIDConnectUserInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2GetOpenIDConnectUserInfoResponse` + """ + model = OAuth2GetOpenIDConnectUserInfoResponse() + if include_optional: + return OAuth2GetOpenIDConnectUserInfoResponse( + sub = '', + email = '', + email_verified = True, + preferred_username = '', + nickname = '', + picture = '', + locale = '' + ) + else: + return OAuth2GetOpenIDConnectUserInfoResponse( + sub = '', + ) + """ + + def testOAuth2GetOpenIDConnectUserInfoResponse(self): + """Test OAuth2GetOpenIDConnectUserInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_key.py b/test/test_o_auth2_key.py new file mode 100644 index 0000000..6df189e --- /dev/null +++ b/test/test_o_auth2_key.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.o_auth2_key import OAuth2Key + +class TestOAuth2Key(unittest.TestCase): + """OAuth2Key unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2Key: + """Test OAuth2Key + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2Key` + """ + model = OAuth2Key() + if include_optional: + return OAuth2Key( + kty = '', + use = '', + kid = '', + n = '', + e = '', + alg = '' + ) + else: + return OAuth2Key( + kty = '', + use = '', + kid = '', + n = '', + e = '', + alg = '', + ) + """ + + def testOAuth2Key(self): + """Test OAuth2Key""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_onboarding_prompt_option_request.py b/test/test_onboarding_prompt_option_request.py new file mode 100644 index 0000000..49ce74f --- /dev/null +++ b/test/test_onboarding_prompt_option_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.onboarding_prompt_option_request import OnboardingPromptOptionRequest + +class TestOnboardingPromptOptionRequest(unittest.TestCase): + """OnboardingPromptOptionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingPromptOptionRequest: + """Test OnboardingPromptOptionRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OnboardingPromptOptionRequest` + """ + model = OnboardingPromptOptionRequest() + if include_optional: + return OnboardingPromptOptionRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '0', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + emoji_animated = True, + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return OnboardingPromptOptionRequest( + title = '0', + ) + """ + + def testOnboardingPromptOptionRequest(self): + """Test OnboardingPromptOptionRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_onboarding_prompt_option_response.py b/test/test_onboarding_prompt_option_response.py new file mode 100644 index 0000000..01c0c87 --- /dev/null +++ b/test/test_onboarding_prompt_option_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.onboarding_prompt_option_response import OnboardingPromptOptionResponse + +class TestOnboardingPromptOptionResponse(unittest.TestCase): + """OnboardingPromptOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingPromptOptionResponse: + """Test OnboardingPromptOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OnboardingPromptOptionResponse` + """ + model = OnboardingPromptOptionResponse() + if include_optional: + return OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + ) + """ + + def testOnboardingPromptOptionResponse(self): + """Test OnboardingPromptOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_onboarding_prompt_response.py b/test/test_onboarding_prompt_response.py new file mode 100644 index 0000000..81c7797 --- /dev/null +++ b/test/test_onboarding_prompt_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.onboarding_prompt_response import OnboardingPromptResponse + +class TestOnboardingPromptResponse(unittest.TestCase): + """OnboardingPromptResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OnboardingPromptResponse: + """Test OnboardingPromptResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OnboardingPromptResponse` + """ + model = OnboardingPromptResponse() + if include_optional: + return OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56 + ) + else: + return OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, + ) + """ + + def testOnboardingPromptResponse(self): + """Test OnboardingPromptResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_partial_discord_integration_response.py b/test/test_partial_discord_integration_response.py new file mode 100644 index 0000000..eda3553 --- /dev/null +++ b/test/test_partial_discord_integration_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.partial_discord_integration_response import PartialDiscordIntegrationResponse + +class TestPartialDiscordIntegrationResponse(unittest.TestCase): + """PartialDiscordIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartialDiscordIntegrationResponse: + """Test PartialDiscordIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartialDiscordIntegrationResponse` + """ + model = PartialDiscordIntegrationResponse() + if include_optional: + return PartialDiscordIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return PartialDiscordIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testPartialDiscordIntegrationResponse(self): + """Test PartialDiscordIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_partial_external_connection_integration_response.py b/test/test_partial_external_connection_integration_response.py new file mode 100644 index 0000000..8aba3ec --- /dev/null +++ b/test/test_partial_external_connection_integration_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.partial_external_connection_integration_response import PartialExternalConnectionIntegrationResponse + +class TestPartialExternalConnectionIntegrationResponse(unittest.TestCase): + """PartialExternalConnectionIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartialExternalConnectionIntegrationResponse: + """Test PartialExternalConnectionIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartialExternalConnectionIntegrationResponse` + """ + model = PartialExternalConnectionIntegrationResponse() + if include_optional: + return PartialExternalConnectionIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ) + ) + else: + return PartialExternalConnectionIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + ) + """ + + def testPartialExternalConnectionIntegrationResponse(self): + """Test PartialExternalConnectionIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_partial_guild_subscription_integration_response.py b/test/test_partial_guild_subscription_integration_response.py new file mode 100644 index 0000000..87687fa --- /dev/null +++ b/test/test_partial_guild_subscription_integration_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.partial_guild_subscription_integration_response import PartialGuildSubscriptionIntegrationResponse + +class TestPartialGuildSubscriptionIntegrationResponse(unittest.TestCase): + """PartialGuildSubscriptionIntegrationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartialGuildSubscriptionIntegrationResponse: + """Test PartialGuildSubscriptionIntegrationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartialGuildSubscriptionIntegrationResponse` + """ + model = PartialGuildSubscriptionIntegrationResponse() + if include_optional: + return PartialGuildSubscriptionIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + name = '', + account = dc_rest.models.account_response.AccountResponse( + id = '', + name = '', ) + ) + else: + return PartialGuildSubscriptionIntegrationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = '', + ) + """ + + def testPartialGuildSubscriptionIntegrationResponse(self): + """Test PartialGuildSubscriptionIntegrationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_partner_sdk_unmerge_provisional_account_request.py b/test/test_partner_sdk_unmerge_provisional_account_request.py new file mode 100644 index 0000000..b9956b9 --- /dev/null +++ b/test/test_partner_sdk_unmerge_provisional_account_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.partner_sdk_unmerge_provisional_account_request import PartnerSdkUnmergeProvisionalAccountRequest + +class TestPartnerSdkUnmergeProvisionalAccountRequest(unittest.TestCase): + """PartnerSdkUnmergeProvisionalAccountRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartnerSdkUnmergeProvisionalAccountRequest: + """Test PartnerSdkUnmergeProvisionalAccountRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartnerSdkUnmergeProvisionalAccountRequest` + """ + model = PartnerSdkUnmergeProvisionalAccountRequest() + if include_optional: + return PartnerSdkUnmergeProvisionalAccountRequest( + client_id = '9072888001528021798096225500850762068629339333975650685139102691291', + client_secret = '', + external_auth_token = '', + external_auth_type = '' + ) + else: + return PartnerSdkUnmergeProvisionalAccountRequest( + client_id = '9072888001528021798096225500850762068629339333975650685139102691291', + external_auth_token = '', + external_auth_type = '', + ) + """ + + def testPartnerSdkUnmergeProvisionalAccountRequest(self): + """Test PartnerSdkUnmergeProvisionalAccountRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pinned_message_response.py b/test/test_pinned_message_response.py new file mode 100644 index 0000000..26f17cf --- /dev/null +++ b/test/test_pinned_message_response.py @@ -0,0 +1,848 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.pinned_message_response import PinnedMessageResponse + +class TestPinnedMessageResponse(unittest.TestCase): + """PinnedMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PinnedMessageResponse: + """Test PinnedMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PinnedMessageResponse` + """ + model = PinnedMessageResponse() + if include_optional: + return PinnedMessageResponse( + pinned_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ) + ) + else: + return PinnedMessageResponse( + pinned_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ), + ) + """ + + def testPinnedMessageResponse(self): + """Test PinnedMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pinned_messages_response.py b/test/test_pinned_messages_response.py new file mode 100644 index 0000000..e7d7ce4 --- /dev/null +++ b/test/test_pinned_messages_response.py @@ -0,0 +1,468 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.pinned_messages_response import PinnedMessagesResponse + +class TestPinnedMessagesResponse(unittest.TestCase): + """PinnedMessagesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PinnedMessagesResponse: + """Test PinnedMessagesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PinnedMessagesResponse` + """ + model = PinnedMessagesResponse() + if include_optional: + return PinnedMessagesResponse( + items = [ + dc_rest.models.pinned_message_response.PinnedMessageResponse( + pinned_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse() + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + activity = dc_rest.models.confetti_potion.confetti_potion(), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56, ), ), ) + ], + has_more = True + ) + else: + return PinnedMessagesResponse( + has_more = True, + ) + """ + + def testPinnedMessagesResponse(self): + """Test PinnedMessagesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_answer_create_request.py b/test/test_poll_answer_create_request.py new file mode 100644 index 0000000..38756bc --- /dev/null +++ b/test/test_poll_answer_create_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_answer_create_request import PollAnswerCreateRequest + +class TestPollAnswerCreateRequest(unittest.TestCase): + """PollAnswerCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollAnswerCreateRequest: + """Test PollAnswerCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollAnswerCreateRequest` + """ + model = PollAnswerCreateRequest() + if include_optional: + return PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ) + ) + else: + return PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + ) + """ + + def testPollAnswerCreateRequest(self): + """Test PollAnswerCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_answer_details_response.py b/test/test_poll_answer_details_response.py new file mode 100644 index 0000000..d9e6922 --- /dev/null +++ b/test/test_poll_answer_details_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_answer_details_response import PollAnswerDetailsResponse + +class TestPollAnswerDetailsResponse(unittest.TestCase): + """PollAnswerDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollAnswerDetailsResponse: + """Test PollAnswerDetailsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollAnswerDetailsResponse` + """ + model = PollAnswerDetailsResponse() + if include_optional: + return PollAnswerDetailsResponse( + users = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ] + ) + else: + return PollAnswerDetailsResponse( + ) + """ + + def testPollAnswerDetailsResponse(self): + """Test PollAnswerDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_answer_response.py b/test/test_poll_answer_response.py new file mode 100644 index 0000000..7cbdd55 --- /dev/null +++ b/test/test_poll_answer_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_answer_response import PollAnswerResponse + +class TestPollAnswerResponse(unittest.TestCase): + """PollAnswerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollAnswerResponse: + """Test PollAnswerResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollAnswerResponse` + """ + model = PollAnswerResponse() + if include_optional: + return PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ) + ) + else: + return PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + ) + """ + + def testPollAnswerResponse(self): + """Test PollAnswerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_create_request.py b/test/test_poll_create_request.py new file mode 100644 index 0000000..bdacb0f --- /dev/null +++ b/test/test_poll_create_request.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_create_request import PollCreateRequest + +class TestPollCreateRequest(unittest.TestCase): + """PollCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollCreateRequest: + """Test PollCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollCreateRequest` + """ + model = PollCreateRequest() + if include_optional: + return PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1 + ) + else: + return PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), ) + ], + ) + """ + + def testPollCreateRequest(self): + """Test PollCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_emoji.py b/test/test_poll_emoji.py new file mode 100644 index 0000000..06786b5 --- /dev/null +++ b/test/test_poll_emoji.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_emoji import PollEmoji + +class TestPollEmoji(unittest.TestCase): + """PollEmoji unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollEmoji: + """Test PollEmoji + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollEmoji` + """ + model = PollEmoji() + if include_optional: + return PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True + ) + else: + return PollEmoji( + ) + """ + + def testPollEmoji(self): + """Test PollEmoji""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_emoji_create_request.py b/test/test_poll_emoji_create_request.py new file mode 100644 index 0000000..b1e0728 --- /dev/null +++ b/test/test_poll_emoji_create_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_emoji_create_request import PollEmojiCreateRequest + +class TestPollEmojiCreateRequest(unittest.TestCase): + """PollEmojiCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollEmojiCreateRequest: + """Test PollEmojiCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollEmojiCreateRequest` + """ + model = PollEmojiCreateRequest() + if include_optional: + return PollEmojiCreateRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True + ) + else: + return PollEmojiCreateRequest( + ) + """ + + def testPollEmojiCreateRequest(self): + """Test PollEmojiCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_media.py b/test/test_poll_media.py new file mode 100644 index 0000000..d6ae03c --- /dev/null +++ b/test/test_poll_media.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_media import PollMedia + +class TestPollMedia(unittest.TestCase): + """PollMedia unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollMedia: + """Test PollMedia + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollMedia` + """ + model = PollMedia() + if include_optional: + return PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ) + ) + else: + return PollMedia( + ) + """ + + def testPollMedia(self): + """Test PollMedia""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_media_create_request.py b/test/test_poll_media_create_request.py new file mode 100644 index 0000000..11237b9 --- /dev/null +++ b/test/test_poll_media_create_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_media_create_request import PollMediaCreateRequest + +class TestPollMediaCreateRequest(unittest.TestCase): + """PollMediaCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollMediaCreateRequest: + """Test PollMediaCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollMediaCreateRequest` + """ + model = PollMediaCreateRequest() + if include_optional: + return PollMediaCreateRequest( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ) + ) + else: + return PollMediaCreateRequest( + ) + """ + + def testPollMediaCreateRequest(self): + """Test PollMediaCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_media_response.py b/test/test_poll_media_response.py new file mode 100644 index 0000000..a9f64cc --- /dev/null +++ b/test/test_poll_media_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_media_response import PollMediaResponse + +class TestPollMediaResponse(unittest.TestCase): + """PollMediaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollMediaResponse: + """Test PollMediaResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollMediaResponse` + """ + model = PollMediaResponse() + if include_optional: + return PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ) + ) + else: + return PollMediaResponse( + ) + """ + + def testPollMediaResponse(self): + """Test PollMediaResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_response.py b/test/test_poll_response.py new file mode 100644 index 0000000..4599a38 --- /dev/null +++ b/test/test_poll_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_response import PollResponse + +class TestPollResponse(unittest.TestCase): + """PollResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollResponse: + """Test PollResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollResponse` + """ + model = PollResponse() + if include_optional: + return PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ) + ) + else: + return PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), + ) + """ + + def testPollResponse(self): + """Test PollResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_results_entry_response.py b/test/test_poll_results_entry_response.py new file mode 100644 index 0000000..0aa5682 --- /dev/null +++ b/test/test_poll_results_entry_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_results_entry_response import PollResultsEntryResponse + +class TestPollResultsEntryResponse(unittest.TestCase): + """PollResultsEntryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollResultsEntryResponse: + """Test PollResultsEntryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollResultsEntryResponse` + """ + model = PollResultsEntryResponse() + if include_optional: + return PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True + ) + else: + return PollResultsEntryResponse( + id = 56, + count = 56, + ) + """ + + def testPollResultsEntryResponse(self): + """Test PollResultsEntryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_poll_results_response.py b/test/test_poll_results_response.py new file mode 100644 index 0000000..a79a3c9 --- /dev/null +++ b/test/test_poll_results_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.poll_results_response import PollResultsResponse + +class TestPollResultsResponse(unittest.TestCase): + """PollResultsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PollResultsResponse: + """Test PollResultsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PollResultsResponse` + """ + model = PollResultsResponse() + if include_optional: + return PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True + ) + else: + return PollResultsResponse( + is_finalized = True, + ) + """ + + def testPollResultsResponse(self): + """Test PollResultsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pong_interaction_callback_request.py b/test/test_pong_interaction_callback_request.py new file mode 100644 index 0000000..471a949 --- /dev/null +++ b/test/test_pong_interaction_callback_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.pong_interaction_callback_request import PongInteractionCallbackRequest + +class TestPongInteractionCallbackRequest(unittest.TestCase): + """PongInteractionCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PongInteractionCallbackRequest: + """Test PongInteractionCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PongInteractionCallbackRequest` + """ + model = PongInteractionCallbackRequest() + if include_optional: + return PongInteractionCallbackRequest( + type = 56 + ) + else: + return PongInteractionCallbackRequest( + type = 56, + ) + """ + + def testPongInteractionCallbackRequest(self): + """Test PongInteractionCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_application_response.py b/test/test_private_application_response.py new file mode 100644 index 0000000..e2bc8fa --- /dev/null +++ b/test/test_private_application_response.py @@ -0,0 +1,250 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.private_application_response import PrivateApplicationResponse + +class TestPrivateApplicationResponse(unittest.TestCase): + """PrivateApplicationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrivateApplicationResponse: + """Test PrivateApplicationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrivateApplicationResponse` + """ + model = PrivateApplicationResponse() + if include_optional: + return PrivateApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], + redirect_uris = [ + '' + ], + interactions_endpoint_url = '', + role_connections_verification_url = '', + owner = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + approximate_guild_count = 56, + approximate_user_install_count = 56, + approximate_user_authorization_count = 56, + explicit_content_filter = 56, + team = dc_rest.models.team_response.TeamResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', + owner_user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + members = [ + dc_rest.models.team_member_response.TeamMemberResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + membership_state = 56, ) + ], ) + ) + else: + return PrivateApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + verify_key = '', + flags = 56, + redirect_uris = [ + '' + ], + owner = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + approximate_user_install_count = 56, + approximate_user_authorization_count = 56, + explicit_content_filter = 56, + ) + """ + + def testPrivateApplicationResponse(self): + """Test PrivateApplicationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_channel_location.py b/test/test_private_channel_location.py new file mode 100644 index 0000000..50d0c50 --- /dev/null +++ b/test/test_private_channel_location.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.private_channel_location import PrivateChannelLocation + +class TestPrivateChannelLocation(unittest.TestCase): + """PrivateChannelLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrivateChannelLocation: + """Test PrivateChannelLocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrivateChannelLocation` + """ + model = PrivateChannelLocation() + if include_optional: + return PrivateChannelLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return PrivateChannelLocation( + id = '', + kind = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testPrivateChannelLocation(self): + """Test PrivateChannelLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_channel_response.py b/test/test_private_channel_response.py new file mode 100644 index 0000000..0f4eb0f --- /dev/null +++ b/test/test_private_channel_response.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.private_channel_response import PrivateChannelResponse + +class TestPrivateChannelResponse(unittest.TestCase): + """PrivateChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrivateChannelResponse: + """Test PrivateChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrivateChannelResponse` + """ + model = PrivateChannelResponse() + if include_optional: + return PrivateChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ] + ) + else: + return PrivateChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + ) + """ + + def testPrivateChannelResponse(self): + """Test PrivateChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_group_channel_response.py b/test/test_private_group_channel_response.py new file mode 100644 index 0000000..c8e2764 --- /dev/null +++ b/test/test_private_group_channel_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.private_group_channel_response import PrivateGroupChannelResponse + +class TestPrivateGroupChannelResponse(unittest.TestCase): + """PrivateGroupChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrivateGroupChannelResponse: + """Test PrivateGroupChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrivateGroupChannelResponse` + """ + model = PrivateGroupChannelResponse() + if include_optional: + return PrivateGroupChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + name = '', + icon = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + managed = True, + application_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return PrivateGroupChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + recipients = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + ) + """ + + def testPrivateGroupChannelResponse(self): + """Test PrivateGroupChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_guild_member_response.py b/test/test_private_guild_member_response.py new file mode 100644 index 0000000..473ddfc --- /dev/null +++ b/test/test_private_guild_member_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.private_guild_member_response import PrivateGuildMemberResponse + +class TestPrivateGuildMemberResponse(unittest.TestCase): + """PrivateGuildMemberResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrivateGuildMemberResponse: + """Test PrivateGuildMemberResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PrivateGuildMemberResponse` + """ + model = PrivateGuildMemberResponse() + if include_optional: + return PrivateGuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True + ) + else: + return PrivateGuildMemberResponse( + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pending = True, + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, + ) + """ + + def testPrivateGuildMemberResponse(self): + """Test PrivateGuildMemberResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_provisional_token_response.py b/test/test_provisional_token_response.py new file mode 100644 index 0000000..6801c3b --- /dev/null +++ b/test/test_provisional_token_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.provisional_token_response import ProvisionalTokenResponse + +class TestProvisionalTokenResponse(unittest.TestCase): + """ProvisionalTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProvisionalTokenResponse: + """Test ProvisionalTokenResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProvisionalTokenResponse` + """ + model = ProvisionalTokenResponse() + if include_optional: + return ProvisionalTokenResponse( + token_type = '', + access_token = '', + expires_in = 56, + scope = '', + id_token = '', + refresh_token = '', + scopes = [ + '' + ], + expires_at_s = 56 + ) + else: + return ProvisionalTokenResponse( + token_type = '', + access_token = '', + expires_in = 56, + scope = '', + id_token = '', + ) + """ + + def testProvisionalTokenResponse(self): + """Test ProvisionalTokenResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_prune_guild_request.py b/test/test_prune_guild_request.py new file mode 100644 index 0000000..5746090 --- /dev/null +++ b/test/test_prune_guild_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.prune_guild_request import PruneGuildRequest + +class TestPruneGuildRequest(unittest.TestCase): + """PruneGuildRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PruneGuildRequest: + """Test PruneGuildRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PruneGuildRequest` + """ + model = PruneGuildRequest() + if include_optional: + return PruneGuildRequest( + days = 1, + compute_prune_count = True, + include_roles = None + ) + else: + return PruneGuildRequest( + ) + """ + + def testPruneGuildRequest(self): + """Test PruneGuildRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_prune_guild_request_include_roles.py b/test/test_prune_guild_request_include_roles.py new file mode 100644 index 0000000..b9104a2 --- /dev/null +++ b/test/test_prune_guild_request_include_roles.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.prune_guild_request_include_roles import PruneGuildRequestIncludeRoles + +class TestPruneGuildRequestIncludeRoles(unittest.TestCase): + """PruneGuildRequestIncludeRoles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PruneGuildRequestIncludeRoles: + """Test PruneGuildRequestIncludeRoles + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PruneGuildRequestIncludeRoles` + """ + model = PruneGuildRequestIncludeRoles() + if include_optional: + return PruneGuildRequestIncludeRoles( + ) + else: + return PruneGuildRequestIncludeRoles( + ) + """ + + def testPruneGuildRequestIncludeRoles(self): + """Test PruneGuildRequestIncludeRoles""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_purchase_notification_response.py b/test/test_purchase_notification_response.py new file mode 100644 index 0000000..43125a9 --- /dev/null +++ b/test/test_purchase_notification_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.purchase_notification_response import PurchaseNotificationResponse + +class TestPurchaseNotificationResponse(unittest.TestCase): + """PurchaseNotificationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PurchaseNotificationResponse: + """Test PurchaseNotificationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PurchaseNotificationResponse` + """ + model = PurchaseNotificationResponse() + if include_optional: + return PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ) + ) + else: + return PurchaseNotificationResponse( + type = 56, + ) + """ + + def testPurchaseNotificationResponse(self): + """Test PurchaseNotificationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_quarantine_user_action.py b/test/test_quarantine_user_action.py new file mode 100644 index 0000000..c9d3b75 --- /dev/null +++ b/test/test_quarantine_user_action.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.quarantine_user_action import QuarantineUserAction + +class TestQuarantineUserAction(unittest.TestCase): + """QuarantineUserAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuarantineUserAction: + """Test QuarantineUserAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuarantineUserAction` + """ + model = QuarantineUserAction() + if include_optional: + return QuarantineUserAction( + type = 56, + metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return QuarantineUserAction( + type = 56, + ) + """ + + def testQuarantineUserAction(self): + """Test QuarantineUserAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_quarantine_user_action_response.py b/test/test_quarantine_user_action_response.py new file mode 100644 index 0000000..c0f943e --- /dev/null +++ b/test/test_quarantine_user_action_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.quarantine_user_action_response import QuarantineUserActionResponse + +class TestQuarantineUserActionResponse(unittest.TestCase): + """QuarantineUserActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuarantineUserActionResponse: + """Test QuarantineUserActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuarantineUserActionResponse` + """ + model = QuarantineUserActionResponse() + if include_optional: + return QuarantineUserActionResponse( + type = 56, + metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return QuarantineUserActionResponse( + type = 56, + metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testQuarantineUserActionResponse(self): + """Test QuarantineUserActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resolved_objects_response.py b/test/test_resolved_objects_response.py new file mode 100644 index 0000000..7f41ab9 --- /dev/null +++ b/test/test_resolved_objects_response.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.resolved_objects_response import ResolvedObjectsResponse + +class TestResolvedObjectsResponse(unittest.TestCase): + """ResolvedObjectsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResolvedObjectsResponse: + """Test ResolvedObjectsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResolvedObjectsResponse` + """ + model = ResolvedObjectsResponse() + if include_optional: + return ResolvedObjectsResponse( + users = { + 'key' : dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + } + ) + else: + return ResolvedObjectsResponse( + users = { + 'key' : dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', + tags = dc_rest.models.guild_role_tags_response.GuildRoleTagsResponse( + premium_subscriber = null, + bot_id = '9072888001528021798096225500850762068629339333975650685139102691291', + integration_id = '9072888001528021798096225500850762068629339333975650685139102691291', + subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available_for_purchase = null, + guild_connections = null, ), ) + }, + ) + """ + + def testResolvedObjectsResponse(self): + """Test ResolvedObjectsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_channel_response.py b/test/test_resource_channel_response.py new file mode 100644 index 0000000..0b4b0b6 --- /dev/null +++ b/test/test_resource_channel_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.resource_channel_response import ResourceChannelResponse + +class TestResourceChannelResponse(unittest.TestCase): + """ResourceChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceChannelResponse: + """Test ResourceChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceChannelResponse` + """ + model = ResourceChannelResponse() + if include_optional: + return ResourceChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + icon = '', + description = '' + ) + else: + return ResourceChannelResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + ) + """ + + def testResourceChannelResponse(self): + """Test ResourceChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed.py b/test/test_rich_embed.py new file mode 100644 index 0000000..eac91de --- /dev/null +++ b/test/test_rich_embed.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed import RichEmbed + +class TestRichEmbed(unittest.TestCase): + """RichEmbed unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbed: + """Test RichEmbed + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbed` + """ + model = RichEmbed() + if include_optional: + return RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ) + ) + else: + return RichEmbed( + ) + """ + + def testRichEmbed(self): + """Test RichEmbed""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_author.py b/test/test_rich_embed_author.py new file mode 100644 index 0000000..fd9ffb9 --- /dev/null +++ b/test/test_rich_embed_author.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_author import RichEmbedAuthor + +class TestRichEmbedAuthor(unittest.TestCase): + """RichEmbedAuthor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedAuthor: + """Test RichEmbedAuthor + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedAuthor` + """ + model = RichEmbedAuthor() + if include_optional: + return RichEmbedAuthor( + name = '', + url = '', + icon_url = '' + ) + else: + return RichEmbedAuthor( + ) + """ + + def testRichEmbedAuthor(self): + """Test RichEmbedAuthor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_field.py b/test/test_rich_embed_field.py new file mode 100644 index 0000000..957b26f --- /dev/null +++ b/test/test_rich_embed_field.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_field import RichEmbedField + +class TestRichEmbedField(unittest.TestCase): + """RichEmbedField unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedField: + """Test RichEmbedField + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedField` + """ + model = RichEmbedField() + if include_optional: + return RichEmbedField( + name = '', + value = '', + inline = True + ) + else: + return RichEmbedField( + name = '', + value = '', + ) + """ + + def testRichEmbedField(self): + """Test RichEmbedField""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_footer.py b/test/test_rich_embed_footer.py new file mode 100644 index 0000000..9863497 --- /dev/null +++ b/test/test_rich_embed_footer.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_footer import RichEmbedFooter + +class TestRichEmbedFooter(unittest.TestCase): + """RichEmbedFooter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedFooter: + """Test RichEmbedFooter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedFooter` + """ + model = RichEmbedFooter() + if include_optional: + return RichEmbedFooter( + text = '', + icon_url = '' + ) + else: + return RichEmbedFooter( + ) + """ + + def testRichEmbedFooter(self): + """Test RichEmbedFooter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_image.py b/test/test_rich_embed_image.py new file mode 100644 index 0000000..c948b0a --- /dev/null +++ b/test/test_rich_embed_image.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_image import RichEmbedImage + +class TestRichEmbedImage(unittest.TestCase): + """RichEmbedImage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedImage: + """Test RichEmbedImage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedImage` + """ + model = RichEmbedImage() + if include_optional: + return RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '' + ) + else: + return RichEmbedImage( + ) + """ + + def testRichEmbedImage(self): + """Test RichEmbedImage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_provider.py b/test/test_rich_embed_provider.py new file mode 100644 index 0000000..0f3557d --- /dev/null +++ b/test/test_rich_embed_provider.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_provider import RichEmbedProvider + +class TestRichEmbedProvider(unittest.TestCase): + """RichEmbedProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedProvider: + """Test RichEmbedProvider + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedProvider` + """ + model = RichEmbedProvider() + if include_optional: + return RichEmbedProvider( + name = '', + url = '' + ) + else: + return RichEmbedProvider( + ) + """ + + def testRichEmbedProvider(self): + """Test RichEmbedProvider""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_thumbnail.py b/test/test_rich_embed_thumbnail.py new file mode 100644 index 0000000..d456116 --- /dev/null +++ b/test/test_rich_embed_thumbnail.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_thumbnail import RichEmbedThumbnail + +class TestRichEmbedThumbnail(unittest.TestCase): + """RichEmbedThumbnail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedThumbnail: + """Test RichEmbedThumbnail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedThumbnail` + """ + model = RichEmbedThumbnail() + if include_optional: + return RichEmbedThumbnail( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '' + ) + else: + return RichEmbedThumbnail( + ) + """ + + def testRichEmbedThumbnail(self): + """Test RichEmbedThumbnail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rich_embed_video.py b/test/test_rich_embed_video.py new file mode 100644 index 0000000..b8a6d42 --- /dev/null +++ b/test/test_rich_embed_video.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.rich_embed_video import RichEmbedVideo + +class TestRichEmbedVideo(unittest.TestCase): + """RichEmbedVideo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RichEmbedVideo: + """Test RichEmbedVideo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RichEmbedVideo` + """ + model = RichEmbedVideo() + if include_optional: + return RichEmbedVideo( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '' + ) + else: + return RichEmbedVideo( + ) + """ + + def testRichEmbedVideo(self): + """Test RichEmbedVideo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_select_component_for_message_request.py b/test/test_role_select_component_for_message_request.py new file mode 100644 index 0000000..719a2be --- /dev/null +++ b/test/test_role_select_component_for_message_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.role_select_component_for_message_request import RoleSelectComponentForMessageRequest + +class TestRoleSelectComponentForMessageRequest(unittest.TestCase): + """RoleSelectComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleSelectComponentForMessageRequest: + """Test RoleSelectComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleSelectComponentForMessageRequest` + """ + model = RoleSelectComponentForMessageRequest() + if include_optional: + return RoleSelectComponentForMessageRequest( + type = 56, + custom_id = '', + placeholder = '', + min_values = 0, + max_values = 1, + disabled = True, + default_values = [ + dc_rest.models.role_select_default_value.RoleSelectDefaultValue( + type = 'role', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return RoleSelectComponentForMessageRequest( + type = 56, + custom_id = '', + ) + """ + + def testRoleSelectComponentForMessageRequest(self): + """Test RoleSelectComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_select_component_response.py b/test/test_role_select_component_response.py new file mode 100644 index 0000000..feb3ae5 --- /dev/null +++ b/test/test_role_select_component_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.role_select_component_response import RoleSelectComponentResponse + +class TestRoleSelectComponentResponse(unittest.TestCase): + """RoleSelectComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleSelectComponentResponse: + """Test RoleSelectComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleSelectComponentResponse` + """ + model = RoleSelectComponentResponse() + if include_optional: + return RoleSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + placeholder = '', + min_values = 56, + max_values = 56, + disabled = True, + default_values = [ + dc_rest.models.role_select_default_value.RoleSelectDefaultValue( + type = 'role', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return RoleSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + ) + """ + + def testRoleSelectComponentResponse(self): + """Test RoleSelectComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_select_default_value.py b/test/test_role_select_default_value.py new file mode 100644 index 0000000..7cc4c8e --- /dev/null +++ b/test/test_role_select_default_value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.role_select_default_value import RoleSelectDefaultValue + +class TestRoleSelectDefaultValue(unittest.TestCase): + """RoleSelectDefaultValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleSelectDefaultValue: + """Test RoleSelectDefaultValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleSelectDefaultValue` + """ + model = RoleSelectDefaultValue() + if include_optional: + return RoleSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return RoleSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testRoleSelectDefaultValue(self): + """Test RoleSelectDefaultValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_select_default_value_response.py b/test/test_role_select_default_value_response.py new file mode 100644 index 0000000..5cf8af0 --- /dev/null +++ b/test/test_role_select_default_value_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.role_select_default_value_response import RoleSelectDefaultValueResponse + +class TestRoleSelectDefaultValueResponse(unittest.TestCase): + """RoleSelectDefaultValueResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleSelectDefaultValueResponse: + """Test RoleSelectDefaultValueResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleSelectDefaultValueResponse` + """ + model = RoleSelectDefaultValueResponse() + if include_optional: + return RoleSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return RoleSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testRoleSelectDefaultValueResponse(self): + """Test RoleSelectDefaultValueResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_scheduled_event_response.py b/test/test_scheduled_event_response.py new file mode 100644 index 0000000..85466d7 --- /dev/null +++ b/test/test_scheduled_event_response.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.scheduled_event_response import ScheduledEventResponse + +class TestScheduledEventResponse(unittest.TestCase): + """ScheduledEventResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ScheduledEventResponse: + """Test ScheduledEventResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScheduledEventResponse` + """ + model = ScheduledEventResponse() + if include_optional: + return ScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = None, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ), ) + ) + else: + return ScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + privacy_level = None, + ) + """ + + def testScheduledEventResponse(self): + """Test ScheduledEventResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_scheduled_event_user_response.py b/test/test_scheduled_event_user_response.py new file mode 100644 index 0000000..cb6bfeb --- /dev/null +++ b/test/test_scheduled_event_user_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.scheduled_event_user_response import ScheduledEventUserResponse + +class TestScheduledEventUserResponse(unittest.TestCase): + """ScheduledEventUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ScheduledEventUserResponse: + """Test ScheduledEventUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScheduledEventUserResponse` + """ + model = ScheduledEventUserResponse() + if include_optional: + return ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ) + ) + else: + return ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testScheduledEventUserResponse(self): + """Test ScheduledEventUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sdk_message_request.py b/test/test_sdk_message_request.py new file mode 100644 index 0000000..9ad4829 --- /dev/null +++ b/test/test_sdk_message_request.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.sdk_message_request import SDKMessageRequest + +class TestSDKMessageRequest(unittest.TestCase): + """SDKMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SDKMessageRequest: + """Test SDKMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SDKMessageRequest` + """ + model = SDKMessageRequest() + if include_optional: + return SDKMessageRequest( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + sticker_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + components = [ + null + ], + flags = 56, + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + poll = dc_rest.models.poll_create_request.PollCreateRequest( + question = dc_rest.models.poll_media.PollMedia( + text = '0', + emoji = dc_rest.models.poll_emoji.PollEmoji( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_create_request.PollAnswerCreateRequest( + poll_media = dc_rest.models.poll_media_create_request.PollMediaCreateRequest( + text = '0', ), ) + ], + allow_multiselect = True, + layout_type = 56, + duration = 1, ), + confetti_potion = dc_rest.models.confetti_potion.confetti_potion(), + message_reference = dc_rest.models.message_reference_request.MessageReferenceRequest( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + fail_if_not_exists = True, + type = null, ), + nonce = None, + enforce_nonce = True, + tts = True + ) + else: + return SDKMessageRequest( + ) + """ + + def testSDKMessageRequest(self): + """Test SDKMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_component_for_message_request.py b/test/test_section_component_for_message_request.py new file mode 100644 index 0000000..84913bb --- /dev/null +++ b/test/test_section_component_for_message_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.section_component_for_message_request import SectionComponentForMessageRequest + +class TestSectionComponentForMessageRequest(unittest.TestCase): + """SectionComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SectionComponentForMessageRequest: + """Test SectionComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SectionComponentForMessageRequest` + """ + model = SectionComponentForMessageRequest() + if include_optional: + return SectionComponentForMessageRequest( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + accessory = None + ) + else: + return SectionComponentForMessageRequest( + type = 56, + components = [ + dc_rest.models.text_display_component_for_message_request.TextDisplayComponentForMessageRequest( + type = 10, + content = '0', ) + ], + accessory = None, + ) + """ + + def testSectionComponentForMessageRequest(self): + """Test SectionComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_component_for_message_request_accessory.py b/test/test_section_component_for_message_request_accessory.py new file mode 100644 index 0000000..7850d70 --- /dev/null +++ b/test/test_section_component_for_message_request_accessory.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.section_component_for_message_request_accessory import SectionComponentForMessageRequestAccessory + +class TestSectionComponentForMessageRequestAccessory(unittest.TestCase): + """SectionComponentForMessageRequestAccessory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SectionComponentForMessageRequestAccessory: + """Test SectionComponentForMessageRequestAccessory + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SectionComponentForMessageRequestAccessory` + """ + model = SectionComponentForMessageRequestAccessory() + if include_optional: + return SectionComponentForMessageRequestAccessory( + type = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ) + ) + else: + return SectionComponentForMessageRequestAccessory( + type = 56, + style = 56, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + ) + """ + + def testSectionComponentForMessageRequestAccessory(self): + """Test SectionComponentForMessageRequestAccessory""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_component_response.py b/test/test_section_component_response.py new file mode 100644 index 0000000..2f416d6 --- /dev/null +++ b/test/test_section_component_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.section_component_response import SectionComponentResponse + +class TestSectionComponentResponse(unittest.TestCase): + """SectionComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SectionComponentResponse: + """Test SectionComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SectionComponentResponse` + """ + model = SectionComponentResponse() + if include_optional: + return SectionComponentResponse( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + accessory = None + ) + else: + return SectionComponentResponse( + type = 56, + id = 56, + components = [ + dc_rest.models.text_display_component_response.TextDisplayComponentResponse( + type = 10, + id = 56, + content = '', ) + ], + accessory = None, + ) + """ + + def testSectionComponentResponse(self): + """Test SectionComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_section_component_response_accessory.py b/test/test_section_component_response_accessory.py new file mode 100644 index 0000000..13a0eb7 --- /dev/null +++ b/test/test_section_component_response_accessory.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.section_component_response_accessory import SectionComponentResponseAccessory + +class TestSectionComponentResponseAccessory(unittest.TestCase): + """SectionComponentResponseAccessory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SectionComponentResponseAccessory: + """Test SectionComponentResponseAccessory + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SectionComponentResponseAccessory` + """ + model = SectionComponentResponseAccessory() + if include_optional: + return SectionComponentResponseAccessory( + type = 56, + id = 56, + custom_id = '', + style = 56, + label = '', + disabled = True, + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + url = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True + ) + else: + return SectionComponentResponseAccessory( + type = 56, + id = 56, + style = 56, + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + spoiler = True, + ) + """ + + def testSectionComponentResponseAccessory(self): + """Test SectionComponentResponseAccessory""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_separator_component_for_message_request.py b/test/test_separator_component_for_message_request.py new file mode 100644 index 0000000..cb9d8cb --- /dev/null +++ b/test/test_separator_component_for_message_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.separator_component_for_message_request import SeparatorComponentForMessageRequest + +class TestSeparatorComponentForMessageRequest(unittest.TestCase): + """SeparatorComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SeparatorComponentForMessageRequest: + """Test SeparatorComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SeparatorComponentForMessageRequest` + """ + model = SeparatorComponentForMessageRequest() + if include_optional: + return SeparatorComponentForMessageRequest( + type = 56, + spacing = 56, + divider = True + ) + else: + return SeparatorComponentForMessageRequest( + type = 56, + ) + """ + + def testSeparatorComponentForMessageRequest(self): + """Test SeparatorComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_separator_component_response.py b/test/test_separator_component_response.py new file mode 100644 index 0000000..11d59ea --- /dev/null +++ b/test/test_separator_component_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.separator_component_response import SeparatorComponentResponse + +class TestSeparatorComponentResponse(unittest.TestCase): + """SeparatorComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SeparatorComponentResponse: + """Test SeparatorComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SeparatorComponentResponse` + """ + model = SeparatorComponentResponse() + if include_optional: + return SeparatorComponentResponse( + type = 56, + id = 56, + spacing = 56, + divider = True + ) + else: + return SeparatorComponentResponse( + type = 56, + id = 56, + spacing = 56, + divider = True, + ) + """ + + def testSeparatorComponentResponse(self): + """Test SeparatorComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_channel_permission_overwrite_request.py b/test/test_set_channel_permission_overwrite_request.py new file mode 100644 index 0000000..c3d312b --- /dev/null +++ b/test/test_set_channel_permission_overwrite_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.set_channel_permission_overwrite_request import SetChannelPermissionOverwriteRequest + +class TestSetChannelPermissionOverwriteRequest(unittest.TestCase): + """SetChannelPermissionOverwriteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetChannelPermissionOverwriteRequest: + """Test SetChannelPermissionOverwriteRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetChannelPermissionOverwriteRequest` + """ + model = SetChannelPermissionOverwriteRequest() + if include_optional: + return SetChannelPermissionOverwriteRequest( + type = 56, + allow = 56, + deny = 56 + ) + else: + return SetChannelPermissionOverwriteRequest( + ) + """ + + def testSetChannelPermissionOverwriteRequest(self): + """Test SetChannelPermissionOverwriteRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_guild_application_command_permissions_request.py b/test/test_set_guild_application_command_permissions_request.py new file mode 100644 index 0000000..c1d0df8 --- /dev/null +++ b/test/test_set_guild_application_command_permissions_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.set_guild_application_command_permissions_request import SetGuildApplicationCommandPermissionsRequest + +class TestSetGuildApplicationCommandPermissionsRequest(unittest.TestCase): + """SetGuildApplicationCommandPermissionsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetGuildApplicationCommandPermissionsRequest: + """Test SetGuildApplicationCommandPermissionsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetGuildApplicationCommandPermissionsRequest` + """ + model = SetGuildApplicationCommandPermissionsRequest() + if include_optional: + return SetGuildApplicationCommandPermissionsRequest( + permissions = [ + dc_rest.models.command_permission_response.CommandPermissionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + permission = True, ) + ] + ) + else: + return SetGuildApplicationCommandPermissionsRequest( + ) + """ + + def testSetGuildApplicationCommandPermissionsRequest(self): + """Test SetGuildApplicationCommandPermissionsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_guild_mfa_level_request.py b/test/test_set_guild_mfa_level_request.py new file mode 100644 index 0000000..1cd3e70 --- /dev/null +++ b/test/test_set_guild_mfa_level_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.set_guild_mfa_level_request import SetGuildMfaLevelRequest + +class TestSetGuildMfaLevelRequest(unittest.TestCase): + """SetGuildMfaLevelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetGuildMfaLevelRequest: + """Test SetGuildMfaLevelRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetGuildMfaLevelRequest` + """ + model = SetGuildMfaLevelRequest() + if include_optional: + return SetGuildMfaLevelRequest( + level = 56 + ) + else: + return SetGuildMfaLevelRequest( + level = 56, + ) + """ + + def testSetGuildMfaLevelRequest(self): + """Test SetGuildMfaLevelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_settings_emoji_response.py b/test/test_settings_emoji_response.py new file mode 100644 index 0000000..d33b7bc --- /dev/null +++ b/test/test_settings_emoji_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.settings_emoji_response import SettingsEmojiResponse + +class TestSettingsEmojiResponse(unittest.TestCase): + """SettingsEmojiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SettingsEmojiResponse: + """Test SettingsEmojiResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SettingsEmojiResponse` + """ + model = SettingsEmojiResponse() + if include_optional: + return SettingsEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True + ) + else: + return SettingsEmojiResponse( + ) + """ + + def testSettingsEmojiResponse(self): + """Test SettingsEmojiResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_slack_webhook.py b/test/test_slack_webhook.py new file mode 100644 index 0000000..ce10b3e --- /dev/null +++ b/test/test_slack_webhook.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.slack_webhook import SlackWebhook + +class TestSlackWebhook(unittest.TestCase): + """SlackWebhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SlackWebhook: + """Test SlackWebhook + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SlackWebhook` + """ + model = SlackWebhook() + if include_optional: + return SlackWebhook( + text = '', + username = '', + icon_url = '', + attachments = [ + dc_rest.models.webhook_slack_embed.WebhookSlackEmbed( + title = '', + title_link = '', + text = '', + color = '#2EC', + ts = 56, + pretext = '', + footer = '', + footer_icon = '', + author_name = '', + author_link = '', + author_icon = '', + image_url = '', + thumb_url = '', + fields = [ + dc_rest.models.webhook_slack_embed_field.WebhookSlackEmbedField( + name = '', + value = '', + inline = True, ) + ], ) + ] + ) + else: + return SlackWebhook( + ) + """ + + def testSlackWebhook(self): + """Test SlackWebhook""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_soundboard_create_request.py b/test/test_soundboard_create_request.py new file mode 100644 index 0000000..4ba1a54 --- /dev/null +++ b/test/test_soundboard_create_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.soundboard_create_request import SoundboardCreateRequest + +class TestSoundboardCreateRequest(unittest.TestCase): + """SoundboardCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SoundboardCreateRequest: + """Test SoundboardCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SoundboardCreateRequest` + """ + model = SoundboardCreateRequest() + if include_optional: + return SoundboardCreateRequest( + name = '01', + volume = 0, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '0', + sound = '' + ) + else: + return SoundboardCreateRequest( + name = '01', + sound = '', + ) + """ + + def testSoundboardCreateRequest(self): + """Test SoundboardCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_soundboard_patch_request_partial.py b/test/test_soundboard_patch_request_partial.py new file mode 100644 index 0000000..1d1d48a --- /dev/null +++ b/test/test_soundboard_patch_request_partial.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.soundboard_patch_request_partial import SoundboardPatchRequestPartial + +class TestSoundboardPatchRequestPartial(unittest.TestCase): + """SoundboardPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SoundboardPatchRequestPartial: + """Test SoundboardPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SoundboardPatchRequestPartial` + """ + model = SoundboardPatchRequestPartial() + if include_optional: + return SoundboardPatchRequestPartial( + name = '01', + volume = 0, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '0' + ) + else: + return SoundboardPatchRequestPartial( + ) + """ + + def testSoundboardPatchRequestPartial(self): + """Test SoundboardPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_soundboard_sound_response.py b/test/test_soundboard_sound_response.py new file mode 100644 index 0000000..6400c82 --- /dev/null +++ b/test/test_soundboard_sound_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.soundboard_sound_response import SoundboardSoundResponse + +class TestSoundboardSoundResponse(unittest.TestCase): + """SoundboardSoundResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SoundboardSoundResponse: + """Test SoundboardSoundResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SoundboardSoundResponse` + """ + model = SoundboardSoundResponse() + if include_optional: + return SoundboardSoundResponse( + name = '', + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + volume = 1.337, + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + available = True, + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ) + else: + return SoundboardSoundResponse( + name = '', + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + volume = 1.337, + available = True, + ) + """ + + def testSoundboardSoundResponse(self): + """Test SoundboardSoundResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_soundboard_sound_send_request.py b/test/test_soundboard_sound_send_request.py new file mode 100644 index 0000000..c21f15f --- /dev/null +++ b/test/test_soundboard_sound_send_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.soundboard_sound_send_request import SoundboardSoundSendRequest + +class TestSoundboardSoundSendRequest(unittest.TestCase): + """SoundboardSoundSendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SoundboardSoundSendRequest: + """Test SoundboardSoundSendRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SoundboardSoundSendRequest` + """ + model = SoundboardSoundSendRequest() + if include_optional: + return SoundboardSoundSendRequest( + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + source_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return SoundboardSoundSendRequest( + sound_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testSoundboardSoundSendRequest(self): + """Test SoundboardSoundSendRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_spam_link_rule_response.py b/test/test_spam_link_rule_response.py new file mode 100644 index 0000000..951b85c --- /dev/null +++ b/test/test_spam_link_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.spam_link_rule_response import SpamLinkRuleResponse + +class TestSpamLinkRuleResponse(unittest.TestCase): + """SpamLinkRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SpamLinkRuleResponse: + """Test SpamLinkRuleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SpamLinkRuleResponse` + """ + model = SpamLinkRuleResponse() + if include_optional: + return SpamLinkRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return SpamLinkRuleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + event_type = 56, + actions = [ + null + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.confetti_potion.confetti_potion(), + ) + """ + + def testSpamLinkRuleResponse(self): + """Test SpamLinkRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_instance_response.py b/test/test_stage_instance_response.py new file mode 100644 index 0000000..dbdfb08 --- /dev/null +++ b/test/test_stage_instance_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.stage_instance_response import StageInstanceResponse + +class TestStageInstanceResponse(unittest.TestCase): + """StageInstanceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageInstanceResponse: + """Test StageInstanceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageInstanceResponse` + """ + model = StageInstanceResponse() + if include_optional: + return StageInstanceResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + topic = '', + privacy_level = 56, + id = '9072888001528021798096225500850762068629339333975650685139102691291', + discoverable_disabled = True, + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return StageInstanceResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + topic = '', + privacy_level = 56, + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testStageInstanceResponse(self): + """Test StageInstanceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_scheduled_event_create_request.py b/test/test_stage_scheduled_event_create_request.py new file mode 100644 index 0000000..fa5b443 --- /dev/null +++ b/test/test_stage_scheduled_event_create_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.stage_scheduled_event_create_request import StageScheduledEventCreateRequest + +class TestStageScheduledEventCreateRequest(unittest.TestCase): + """StageScheduledEventCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageScheduledEventCreateRequest: + """Test StageScheduledEventCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageScheduledEventCreateRequest` + """ + model = StageScheduledEventCreateRequest() + if include_optional: + return StageScheduledEventCreateRequest( + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return StageScheduledEventCreateRequest( + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + ) + """ + + def testStageScheduledEventCreateRequest(self): + """Test StageScheduledEventCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_scheduled_event_patch_request_partial.py b/test/test_stage_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..c88e9c2 --- /dev/null +++ b/test/test_stage_scheduled_event_patch_request_partial.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.stage_scheduled_event_patch_request_partial import StageScheduledEventPatchRequestPartial + +class TestStageScheduledEventPatchRequestPartial(unittest.TestCase): + """StageScheduledEventPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageScheduledEventPatchRequestPartial: + """Test StageScheduledEventPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageScheduledEventPatchRequestPartial` + """ + model = StageScheduledEventPatchRequestPartial() + if include_optional: + return StageScheduledEventPatchRequestPartial( + status = 56, + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + entity_type = 56, + privacy_level = None, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return StageScheduledEventPatchRequestPartial( + ) + """ + + def testStageScheduledEventPatchRequestPartial(self): + """Test StageScheduledEventPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_scheduled_event_response.py b/test/test_stage_scheduled_event_response.py new file mode 100644 index 0000000..5911b8c --- /dev/null +++ b/test/test_stage_scheduled_event_response.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.stage_scheduled_event_response import StageScheduledEventResponse + +class TestStageScheduledEventResponse(unittest.TestCase): + """StageScheduledEventResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageScheduledEventResponse: + """Test StageScheduledEventResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageScheduledEventResponse` + """ + model = StageScheduledEventResponse() + if include_optional: + return StageScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = None, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ), ), + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return StageScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + privacy_level = None, + ) + """ + + def testStageScheduledEventResponse(self): + """Test StageScheduledEventResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_standard_sticker_response.py b/test/test_standard_sticker_response.py new file mode 100644 index 0000000..bf89ff3 --- /dev/null +++ b/test/test_standard_sticker_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.standard_sticker_response import StandardStickerResponse + +class TestStandardStickerResponse(unittest.TestCase): + """StandardStickerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StandardStickerResponse: + """Test StandardStickerResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StandardStickerResponse` + """ + model = StandardStickerResponse() + if include_optional: + return StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + format_type = 56, + description = '', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56 + ) + else: + return StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 56, + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, + ) + """ + + def testStandardStickerResponse(self): + """Test StandardStickerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sticker_pack_collection_response.py b/test/test_sticker_pack_collection_response.py new file mode 100644 index 0000000..09edf16 --- /dev/null +++ b/test/test_sticker_pack_collection_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.sticker_pack_collection_response import StickerPackCollectionResponse + +class TestStickerPackCollectionResponse(unittest.TestCase): + """StickerPackCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StickerPackCollectionResponse: + """Test StickerPackCollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StickerPackCollectionResponse` + """ + model = StickerPackCollectionResponse() + if include_optional: + return StickerPackCollectionResponse( + sticker_packs = [ + dc_rest.models.sticker_pack_response.StickerPackResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + stickers = [ + dc_rest.models.standard_sticker_response.StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 1, + format_type = 56, + description = '', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, ) + ], + cover_sticker_id = '9072888001528021798096225500850762068629339333975650685139102691291', + banner_asset_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return StickerPackCollectionResponse( + sticker_packs = [ + dc_rest.models.sticker_pack_response.StickerPackResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + stickers = [ + dc_rest.models.standard_sticker_response.StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 1, + format_type = 56, + description = '', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, ) + ], + cover_sticker_id = '9072888001528021798096225500850762068629339333975650685139102691291', + banner_asset_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + ) + """ + + def testStickerPackCollectionResponse(self): + """Test StickerPackCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sticker_pack_response.py b/test/test_sticker_pack_response.py new file mode 100644 index 0000000..33b0a28 --- /dev/null +++ b/test/test_sticker_pack_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.sticker_pack_response import StickerPackResponse + +class TestStickerPackResponse(unittest.TestCase): + """StickerPackResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StickerPackResponse: + """Test StickerPackResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StickerPackResponse` + """ + model = StickerPackResponse() + if include_optional: + return StickerPackResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + stickers = [ + dc_rest.models.standard_sticker_response.StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 1, + format_type = 56, + description = '', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, ) + ], + cover_sticker_id = '9072888001528021798096225500850762068629339333975650685139102691291', + banner_asset_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return StickerPackResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + stickers = [ + dc_rest.models.standard_sticker_response.StandardStickerResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + tags = '', + type = 1, + format_type = 56, + description = '', + pack_id = '9072888001528021798096225500850762068629339333975650685139102691291', + sort_value = 56, ) + ], + ) + """ + + def testStickerPackResponse(self): + """Test StickerPackResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_string_select_component_for_message_request.py b/test/test_string_select_component_for_message_request.py new file mode 100644 index 0000000..da38046 --- /dev/null +++ b/test/test_string_select_component_for_message_request.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.string_select_component_for_message_request import StringSelectComponentForMessageRequest + +class TestStringSelectComponentForMessageRequest(unittest.TestCase): + """StringSelectComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StringSelectComponentForMessageRequest: + """Test StringSelectComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StringSelectComponentForMessageRequest` + """ + model = StringSelectComponentForMessageRequest() + if include_optional: + return StringSelectComponentForMessageRequest( + type = 56, + custom_id = '', + placeholder = '', + min_values = 0, + max_values = 1, + disabled = True, + options = [ + dc_rest.models.string_select_option_for_message_request.StringSelectOptionForMessageRequest( + label = '0', + value = '0', + description = '', + default = True, + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), ) + ] + ) + else: + return StringSelectComponentForMessageRequest( + type = 56, + custom_id = '', + options = [ + dc_rest.models.string_select_option_for_message_request.StringSelectOptionForMessageRequest( + label = '0', + value = '0', + description = '', + default = True, + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ), ) + ], + ) + """ + + def testStringSelectComponentForMessageRequest(self): + """Test StringSelectComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_string_select_component_response.py b/test/test_string_select_component_response.py new file mode 100644 index 0000000..0edb818 --- /dev/null +++ b/test/test_string_select_component_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.string_select_component_response import StringSelectComponentResponse + +class TestStringSelectComponentResponse(unittest.TestCase): + """StringSelectComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StringSelectComponentResponse: + """Test StringSelectComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StringSelectComponentResponse` + """ + model = StringSelectComponentResponse() + if include_optional: + return StringSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + placeholder = '', + min_values = 56, + max_values = 56, + disabled = True, + options = [ + dc_rest.models.string_select_option_response.StringSelectOptionResponse( + label = '', + value = '', + description = '', + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + default = True, ) + ] + ) + else: + return StringSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + options = [ + dc_rest.models.string_select_option_response.StringSelectOptionResponse( + label = '', + value = '', + description = '', + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + default = True, ) + ], + ) + """ + + def testStringSelectComponentResponse(self): + """Test StringSelectComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_string_select_option_for_message_request.py b/test/test_string_select_option_for_message_request.py new file mode 100644 index 0000000..17d48a8 --- /dev/null +++ b/test/test_string_select_option_for_message_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.string_select_option_for_message_request import StringSelectOptionForMessageRequest + +class TestStringSelectOptionForMessageRequest(unittest.TestCase): + """StringSelectOptionForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StringSelectOptionForMessageRequest: + """Test StringSelectOptionForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StringSelectOptionForMessageRequest` + """ + model = StringSelectOptionForMessageRequest() + if include_optional: + return StringSelectOptionForMessageRequest( + label = '0', + value = '0', + description = '', + default = True, + emoji = dc_rest.models.component_emoji_for_message_request.ComponentEmojiForMessageRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', ) + ) + else: + return StringSelectOptionForMessageRequest( + label = '0', + value = '0', + ) + """ + + def testStringSelectOptionForMessageRequest(self): + """Test StringSelectOptionForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_string_select_option_response.py b/test/test_string_select_option_response.py new file mode 100644 index 0000000..0b3c1a2 --- /dev/null +++ b/test/test_string_select_option_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.string_select_option_response import StringSelectOptionResponse + +class TestStringSelectOptionResponse(unittest.TestCase): + """StringSelectOptionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StringSelectOptionResponse: + """Test StringSelectOptionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StringSelectOptionResponse` + """ + model = StringSelectOptionResponse() + if include_optional: + return StringSelectOptionResponse( + label = '', + value = '', + description = '', + emoji = dc_rest.models.component_emoji_response.ComponentEmojiResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + animated = True, ), + default = True + ) + else: + return StringSelectOptionResponse( + label = '', + value = '', + ) + """ + + def testStringSelectOptionResponse(self): + """Test StringSelectOptionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_member_response.py b/test/test_team_member_response.py new file mode 100644 index 0000000..4a0e905 --- /dev/null +++ b/test/test_team_member_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.team_member_response import TeamMemberResponse + +class TestTeamMemberResponse(unittest.TestCase): + """TeamMemberResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamMemberResponse: + """Test TeamMemberResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamMemberResponse` + """ + model = TeamMemberResponse() + if include_optional: + return TeamMemberResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + membership_state = 56 + ) + else: + return TeamMemberResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + membership_state = 56, + ) + """ + + def testTeamMemberResponse(self): + """Test TeamMemberResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_response.py b/test/test_team_response.py new file mode 100644 index 0000000..c5e947d --- /dev/null +++ b/test/test_team_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.team_response import TeamResponse + +class TestTeamResponse(unittest.TestCase): + """TeamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamResponse: + """Test TeamResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamResponse` + """ + model = TeamResponse() + if include_optional: + return TeamResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '', + owner_user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + members = [ + dc_rest.models.team_member_response.TeamMemberResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + membership_state = 56, ) + ] + ) + else: + return TeamResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + owner_user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + members = [ + dc_rest.models.team_member_response.TeamMemberResponse( + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + team_id = '9072888001528021798096225500850762068629339333975650685139102691291', + membership_state = 56, ) + ], + ) + """ + + def testTeamResponse(self): + """Test TeamResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_display_component_for_message_request.py b/test/test_text_display_component_for_message_request.py new file mode 100644 index 0000000..7075e7c --- /dev/null +++ b/test/test_text_display_component_for_message_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.text_display_component_for_message_request import TextDisplayComponentForMessageRequest + +class TestTextDisplayComponentForMessageRequest(unittest.TestCase): + """TextDisplayComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextDisplayComponentForMessageRequest: + """Test TextDisplayComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextDisplayComponentForMessageRequest` + """ + model = TextDisplayComponentForMessageRequest() + if include_optional: + return TextDisplayComponentForMessageRequest( + type = 56, + content = '0' + ) + else: + return TextDisplayComponentForMessageRequest( + type = 56, + content = '0', + ) + """ + + def testTextDisplayComponentForMessageRequest(self): + """Test TextDisplayComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_display_component_response.py b/test/test_text_display_component_response.py new file mode 100644 index 0000000..6710c57 --- /dev/null +++ b/test/test_text_display_component_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.text_display_component_response import TextDisplayComponentResponse + +class TestTextDisplayComponentResponse(unittest.TestCase): + """TextDisplayComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextDisplayComponentResponse: + """Test TextDisplayComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextDisplayComponentResponse` + """ + model = TextDisplayComponentResponse() + if include_optional: + return TextDisplayComponentResponse( + type = 56, + id = 56, + content = '' + ) + else: + return TextDisplayComponentResponse( + type = 56, + id = 56, + content = '', + ) + """ + + def testTextDisplayComponentResponse(self): + """Test TextDisplayComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_input_component_for_modal_request.py b/test/test_text_input_component_for_modal_request.py new file mode 100644 index 0000000..baa7f5b --- /dev/null +++ b/test/test_text_input_component_for_modal_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.text_input_component_for_modal_request import TextInputComponentForModalRequest + +class TestTextInputComponentForModalRequest(unittest.TestCase): + """TextInputComponentForModalRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextInputComponentForModalRequest: + """Test TextInputComponentForModalRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextInputComponentForModalRequest` + """ + model = TextInputComponentForModalRequest() + if include_optional: + return TextInputComponentForModalRequest( + type = 56, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 0, + max_length = 1 + ) + else: + return TextInputComponentForModalRequest( + type = 56, + custom_id = '', + style = 56, + label = '', + ) + """ + + def testTextInputComponentForModalRequest(self): + """Test TextInputComponentForModalRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_input_component_response.py b/test/test_text_input_component_response.py new file mode 100644 index 0000000..7908362 --- /dev/null +++ b/test/test_text_input_component_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.text_input_component_response import TextInputComponentResponse + +class TestTextInputComponentResponse(unittest.TestCase): + """TextInputComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextInputComponentResponse: + """Test TextInputComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextInputComponentResponse` + """ + model = TextInputComponentResponse() + if include_optional: + return TextInputComponentResponse( + type = 56, + id = 56, + custom_id = '', + style = 56, + label = '', + value = '', + placeholder = '', + required = True, + min_length = 56, + max_length = 56 + ) + else: + return TextInputComponentResponse( + type = 56, + id = 56, + custom_id = '', + style = 56, + ) + """ + + def testTextInputComponentResponse(self): + """Test TextInputComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_member_response.py b/test/test_thread_member_response.py new file mode 100644 index 0000000..541fd79 --- /dev/null +++ b/test/test_thread_member_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thread_member_response import ThreadMemberResponse + +class TestThreadMemberResponse(unittest.TestCase): + """ThreadMemberResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadMemberResponse: + """Test ThreadMemberResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadMemberResponse` + """ + model = ThreadMemberResponse() + if include_optional: + return ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ) + ) + else: + return ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + ) + """ + + def testThreadMemberResponse(self): + """Test ThreadMemberResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_metadata_response.py b/test/test_thread_metadata_response.py new file mode 100644 index 0000000..006ebd2 --- /dev/null +++ b/test/test_thread_metadata_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thread_metadata_response import ThreadMetadataResponse + +class TestThreadMetadataResponse(unittest.TestCase): + """ThreadMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadMetadataResponse: + """Test ThreadMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadMetadataResponse` + """ + model = ThreadMetadataResponse() + if include_optional: + return ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True + ) + else: + return ThreadMetadataResponse( + archived = True, + auto_archive_duration = 56, + locked = True, + ) + """ + + def testThreadMetadataResponse(self): + """Test ThreadMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_response.py b/test/test_thread_response.py new file mode 100644 index 0000000..b22b316 --- /dev/null +++ b/test/test_thread_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thread_response import ThreadResponse + +class TestThreadResponse(unittest.TestCase): + """ThreadResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadResponse: + """Test ThreadResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadResponse` + """ + model = ThreadResponse() + if include_optional: + return ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ) + ) + else: + return ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + flags = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_count = 56, + member_count = 56, + total_message_sent = 56, + ) + """ + + def testThreadResponse(self): + """Test ThreadResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_search_response.py b/test/test_thread_search_response.py new file mode 100644 index 0000000..38579ed --- /dev/null +++ b/test/test_thread_search_response.py @@ -0,0 +1,641 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thread_search_response import ThreadSearchResponse + +class TestThreadSearchResponse(unittest.TestCase): + """ThreadSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadSearchResponse: + """Test ThreadSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadSearchResponse` + """ + model = ThreadSearchResponse() + if include_optional: + return ThreadSearchResponse( + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + members = [ + dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ), ) + ], + has_more = True, + first_messages = [ + dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + activity = dc_rest.models.confetti_potion.confetti_potion(), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56, ), ) + ], + total_results = 56 + ) + else: + return ThreadSearchResponse( + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + members = [ + dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ), ) + ], + ) + """ + + def testThreadSearchResponse(self): + """Test ThreadSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_search_tag_parameter.py b/test/test_thread_search_tag_parameter.py new file mode 100644 index 0000000..6d5af37 --- /dev/null +++ b/test/test_thread_search_tag_parameter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thread_search_tag_parameter import ThreadSearchTagParameter + +class TestThreadSearchTagParameter(unittest.TestCase): + """ThreadSearchTagParameter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadSearchTagParameter: + """Test ThreadSearchTagParameter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadSearchTagParameter` + """ + model = ThreadSearchTagParameter() + if include_optional: + return ThreadSearchTagParameter( + ) + else: + return ThreadSearchTagParameter( + ) + """ + + def testThreadSearchTagParameter(self): + """Test ThreadSearchTagParameter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_threads_response.py b/test/test_threads_response.py new file mode 100644 index 0000000..64bfb5b --- /dev/null +++ b/test/test_threads_response.py @@ -0,0 +1,640 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.threads_response import ThreadsResponse + +class TestThreadsResponse(unittest.TestCase): + """ThreadsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThreadsResponse: + """Test ThreadsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThreadsResponse` + """ + model = ThreadsResponse() + if include_optional: + return ThreadsResponse( + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + members = [ + dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ), ) + ], + has_more = True, + first_messages = [ + dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = 0, + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + format_type = 56, ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + type = 56, + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + type = null, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + activity = dc_rest.models.confetti_potion.confetti_potion(), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + position = 56, ), ) + ] + ) + else: + return ThreadsResponse( + threads = [ + dc_rest.models.thread_response.ThreadResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = '9072888001528021798096225500850762068629339333975650685139102691291', + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ) + ], + members = [ + dc_rest.models.thread_member_response.ThreadMemberResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ), ) + ], + ) + """ + + def testThreadsResponse(self): + """Test ThreadsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thumbnail_component_for_message_request.py b/test/test_thumbnail_component_for_message_request.py new file mode 100644 index 0000000..396fadd --- /dev/null +++ b/test/test_thumbnail_component_for_message_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thumbnail_component_for_message_request import ThumbnailComponentForMessageRequest + +class TestThumbnailComponentForMessageRequest(unittest.TestCase): + """ThumbnailComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThumbnailComponentForMessageRequest: + """Test ThumbnailComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThumbnailComponentForMessageRequest` + """ + model = ThumbnailComponentForMessageRequest() + if include_optional: + return ThumbnailComponentForMessageRequest( + type = 56, + description = '0', + spoiler = True, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ) + ) + else: + return ThumbnailComponentForMessageRequest( + type = 56, + media = dc_rest.models.unfurled_media_request_with_attachment_reference_required.UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', ), + ) + """ + + def testThumbnailComponentForMessageRequest(self): + """Test ThumbnailComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thumbnail_component_response.py b/test/test_thumbnail_component_response.py new file mode 100644 index 0000000..e5115e9 --- /dev/null +++ b/test/test_thumbnail_component_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.thumbnail_component_response import ThumbnailComponentResponse + +class TestThumbnailComponentResponse(unittest.TestCase): + """ThumbnailComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ThumbnailComponentResponse: + """Test ThumbnailComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ThumbnailComponentResponse` + """ + model = ThumbnailComponentResponse() + if include_optional: + return ThumbnailComponentResponse( + type = 56, + id = 56, + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + description = '', + spoiler = True + ) + else: + return ThumbnailComponentResponse( + type = 56, + id = 56, + media = dc_rest.models.unfurled_media_response.UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + spoiler = True, + ) + """ + + def testThumbnailComponentResponse(self): + """Test ThumbnailComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unfurled_media_request.py b/test/test_unfurled_media_request.py new file mode 100644 index 0000000..75e97dc --- /dev/null +++ b/test/test_unfurled_media_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.unfurled_media_request import UnfurledMediaRequest + +class TestUnfurledMediaRequest(unittest.TestCase): + """UnfurledMediaRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnfurledMediaRequest: + """Test UnfurledMediaRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnfurledMediaRequest` + """ + model = UnfurledMediaRequest() + if include_optional: + return UnfurledMediaRequest( + url = '' + ) + else: + return UnfurledMediaRequest( + url = '', + ) + """ + + def testUnfurledMediaRequest(self): + """Test UnfurledMediaRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unfurled_media_request_with_attachment_reference_required.py b/test/test_unfurled_media_request_with_attachment_reference_required.py new file mode 100644 index 0000000..7e9c8d3 --- /dev/null +++ b/test/test_unfurled_media_request_with_attachment_reference_required.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.unfurled_media_request_with_attachment_reference_required import UnfurledMediaRequestWithAttachmentReferenceRequired + +class TestUnfurledMediaRequestWithAttachmentReferenceRequired(unittest.TestCase): + """UnfurledMediaRequestWithAttachmentReferenceRequired unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnfurledMediaRequestWithAttachmentReferenceRequired: + """Test UnfurledMediaRequestWithAttachmentReferenceRequired + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnfurledMediaRequestWithAttachmentReferenceRequired` + """ + model = UnfurledMediaRequestWithAttachmentReferenceRequired() + if include_optional: + return UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '' + ) + else: + return UnfurledMediaRequestWithAttachmentReferenceRequired( + url = '', + ) + """ + + def testUnfurledMediaRequestWithAttachmentReferenceRequired(self): + """Test UnfurledMediaRequestWithAttachmentReferenceRequired""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unfurled_media_response.py b/test/test_unfurled_media_response.py new file mode 100644 index 0000000..618efe7 --- /dev/null +++ b/test/test_unfurled_media_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.unfurled_media_response import UnfurledMediaResponse + +class TestUnfurledMediaResponse(unittest.TestCase): + """UnfurledMediaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnfurledMediaResponse: + """Test UnfurledMediaResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnfurledMediaResponse` + """ + model = UnfurledMediaResponse() + if include_optional: + return UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + width = 56, + height = 56, + content_type = '', + attachment_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UnfurledMediaResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + url = '', + proxy_url = '', + ) + """ + + def testUnfurledMediaResponse(self): + """Test UnfurledMediaResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_application_emoji_request.py b/test/test_update_application_emoji_request.py new file mode 100644 index 0000000..5eb3bb3 --- /dev/null +++ b/test/test_update_application_emoji_request.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_application_emoji_request import UpdateApplicationEmojiRequest + +class TestUpdateApplicationEmojiRequest(unittest.TestCase): + """UpdateApplicationEmojiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateApplicationEmojiRequest: + """Test UpdateApplicationEmojiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateApplicationEmojiRequest` + """ + model = UpdateApplicationEmojiRequest() + if include_optional: + return UpdateApplicationEmojiRequest( + name = '01' + ) + else: + return UpdateApplicationEmojiRequest( + ) + """ + + def testUpdateApplicationEmojiRequest(self): + """Test UpdateApplicationEmojiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_application_user_role_connection_request.py b/test/test_update_application_user_role_connection_request.py new file mode 100644 index 0000000..cf1fe1e --- /dev/null +++ b/test/test_update_application_user_role_connection_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_application_user_role_connection_request import UpdateApplicationUserRoleConnectionRequest + +class TestUpdateApplicationUserRoleConnectionRequest(unittest.TestCase): + """UpdateApplicationUserRoleConnectionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateApplicationUserRoleConnectionRequest: + """Test UpdateApplicationUserRoleConnectionRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateApplicationUserRoleConnectionRequest` + """ + model = UpdateApplicationUserRoleConnectionRequest() + if include_optional: + return UpdateApplicationUserRoleConnectionRequest( + platform_name = '', + platform_username = '', + metadata = { + 'key' : '0' + } + ) + else: + return UpdateApplicationUserRoleConnectionRequest( + ) + """ + + def testUpdateApplicationUserRoleConnectionRequest(self): + """Test UpdateApplicationUserRoleConnectionRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_auto_moderation_rule_request.py b/test/test_update_auto_moderation_rule_request.py new file mode 100644 index 0000000..a0ff8a3 --- /dev/null +++ b/test/test_update_auto_moderation_rule_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_auto_moderation_rule_request import UpdateAutoModerationRuleRequest + +class TestUpdateAutoModerationRuleRequest(unittest.TestCase): + """UpdateAutoModerationRuleRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAutoModerationRuleRequest: + """Test UpdateAutoModerationRuleRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateAutoModerationRuleRequest` + """ + model = UpdateAutoModerationRuleRequest() + if include_optional: + return UpdateAutoModerationRuleRequest( + name = '', + event_type = 56, + actions = [ + null + ], + enabled = True, + exempt_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + exempt_channels = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + trigger_type = 56, + trigger_metadata = dc_rest.models.mention_spam_trigger_metadata.MentionSpamTriggerMetadata( + mention_total_limit = 0, + mention_raid_protection_enabled = True, ) + ) + else: + return UpdateAutoModerationRuleRequest( + ) + """ + + def testUpdateAutoModerationRuleRequest(self): + """Test UpdateAutoModerationRuleRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_channel_request.py b/test/test_update_channel_request.py new file mode 100644 index 0000000..fe6b535 --- /dev/null +++ b/test/test_update_channel_request.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_channel_request import UpdateChannelRequest + +class TestUpdateChannelRequest(unittest.TestCase): + """UpdateChannelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateChannelRequest: + """Test UpdateChannelRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateChannelRequest` + """ + model = UpdateChannelRequest() + if include_optional: + return UpdateChannelRequest( + name = '', + icon = '', + type = 56, + position = 0, + topic = '', + bitrate = 8000, + user_limit = 0, + nsfw = True, + rate_limit_per_user = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_request.ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56, ) + ], + rtc_region = '', + video_quality_mode = 56, + default_auto_archive_duration = 56, + default_reaction_emoji = dc_rest.models.update_default_reaction_emoji_request.UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 0, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + flags = 56, + available_tags = [ + dc_rest.models.update_thread_tag_request.UpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + archived = True, + locked = True, + invitable = True, + auto_archive_duration = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return UpdateChannelRequest( + ) + """ + + def testUpdateChannelRequest(self): + """Test UpdateChannelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_default_reaction_emoji_request.py b/test/test_update_default_reaction_emoji_request.py new file mode 100644 index 0000000..ece241c --- /dev/null +++ b/test/test_update_default_reaction_emoji_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_default_reaction_emoji_request import UpdateDefaultReactionEmojiRequest + +class TestUpdateDefaultReactionEmojiRequest(unittest.TestCase): + """UpdateDefaultReactionEmojiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDefaultReactionEmojiRequest: + """Test UpdateDefaultReactionEmojiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDefaultReactionEmojiRequest` + """ + model = UpdateDefaultReactionEmojiRequest() + if include_optional: + return UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '' + ) + else: + return UpdateDefaultReactionEmojiRequest( + ) + """ + + def testUpdateDefaultReactionEmojiRequest(self): + """Test UpdateDefaultReactionEmojiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_dm_request_partial.py b/test/test_update_dm_request_partial.py new file mode 100644 index 0000000..0964ed7 --- /dev/null +++ b/test/test_update_dm_request_partial.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_dm_request_partial import UpdateDMRequestPartial + +class TestUpdateDMRequestPartial(unittest.TestCase): + """UpdateDMRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDMRequestPartial: + """Test UpdateDMRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDMRequestPartial` + """ + model = UpdateDMRequestPartial() + if include_optional: + return UpdateDMRequestPartial( + name = '' + ) + else: + return UpdateDMRequestPartial( + ) + """ + + def testUpdateDMRequestPartial(self): + """Test UpdateDMRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_group_dm_request_partial.py b/test/test_update_group_dm_request_partial.py new file mode 100644 index 0000000..032463c --- /dev/null +++ b/test/test_update_group_dm_request_partial.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_group_dm_request_partial import UpdateGroupDMRequestPartial + +class TestUpdateGroupDMRequestPartial(unittest.TestCase): + """UpdateGroupDMRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGroupDMRequestPartial: + """Test UpdateGroupDMRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGroupDMRequestPartial` + """ + model = UpdateGroupDMRequestPartial() + if include_optional: + return UpdateGroupDMRequestPartial( + name = '', + icon = '' + ) + else: + return UpdateGroupDMRequestPartial( + ) + """ + + def testUpdateGroupDMRequestPartial(self): + """Test UpdateGroupDMRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_channel_request_partial.py b/test/test_update_guild_channel_request_partial.py new file mode 100644 index 0000000..2902830 --- /dev/null +++ b/test/test_update_guild_channel_request_partial.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_channel_request_partial import UpdateGuildChannelRequestPartial + +class TestUpdateGuildChannelRequestPartial(unittest.TestCase): + """UpdateGuildChannelRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildChannelRequestPartial: + """Test UpdateGuildChannelRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildChannelRequestPartial` + """ + model = UpdateGuildChannelRequestPartial() + if include_optional: + return UpdateGuildChannelRequestPartial( + type = 56, + name = '0', + position = 0, + topic = '', + bitrate = 8000, + user_limit = 0, + nsfw = True, + rate_limit_per_user = 0, + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + permission_overwrites = [ + dc_rest.models.channel_permission_overwrite_request.ChannelPermissionOverwriteRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + type = 56, + allow = 56, + deny = 56, ) + ], + rtc_region = '', + video_quality_mode = 56, + default_auto_archive_duration = 56, + default_reaction_emoji = dc_rest.models.update_default_reaction_emoji_request.UpdateDefaultReactionEmojiRequest( + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ), + default_thread_rate_limit_per_user = 0, + default_sort_order = 56, + default_forum_layout = 56, + default_tag_setting = '', + flags = 56, + available_tags = [ + dc_rest.models.update_thread_tag_request.UpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return UpdateGuildChannelRequestPartial( + ) + """ + + def testUpdateGuildChannelRequestPartial(self): + """Test UpdateGuildChannelRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_emoji_request.py b/test/test_update_guild_emoji_request.py new file mode 100644 index 0000000..0525056 --- /dev/null +++ b/test/test_update_guild_emoji_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_emoji_request import UpdateGuildEmojiRequest + +class TestUpdateGuildEmojiRequest(unittest.TestCase): + """UpdateGuildEmojiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildEmojiRequest: + """Test UpdateGuildEmojiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildEmojiRequest` + """ + model = UpdateGuildEmojiRequest() + if include_optional: + return UpdateGuildEmojiRequest( + name = '01', + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ] + ) + else: + return UpdateGuildEmojiRequest( + ) + """ + + def testUpdateGuildEmojiRequest(self): + """Test UpdateGuildEmojiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_member_request.py b/test/test_update_guild_member_request.py new file mode 100644 index 0000000..8ff0f45 --- /dev/null +++ b/test/test_update_guild_member_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_member_request import UpdateGuildMemberRequest + +class TestUpdateGuildMemberRequest(unittest.TestCase): + """UpdateGuildMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildMemberRequest: + """Test UpdateGuildMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildMemberRequest` + """ + model = UpdateGuildMemberRequest() + if include_optional: + return UpdateGuildMemberRequest( + nick = '', + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + mute = True, + deaf = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56 + ) + else: + return UpdateGuildMemberRequest( + ) + """ + + def testUpdateGuildMemberRequest(self): + """Test UpdateGuildMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_onboarding_request.py b/test/test_update_guild_onboarding_request.py new file mode 100644 index 0000000..0410add --- /dev/null +++ b/test/test_update_guild_onboarding_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_onboarding_request import UpdateGuildOnboardingRequest + +class TestUpdateGuildOnboardingRequest(unittest.TestCase): + """UpdateGuildOnboardingRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildOnboardingRequest: + """Test UpdateGuildOnboardingRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildOnboardingRequest` + """ + model = UpdateGuildOnboardingRequest() + if include_optional: + return UpdateGuildOnboardingRequest( + prompts = [ + dc_rest.models.update_onboarding_prompt_request.UpdateOnboardingPromptRequest( + title = '0', + options = [ + dc_rest.models.onboarding_prompt_option_request.OnboardingPromptOptionRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '0', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + emoji_animated = True, + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + enabled = True, + default_channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + mode = 56 + ) + else: + return UpdateGuildOnboardingRequest( + ) + """ + + def testUpdateGuildOnboardingRequest(self): + """Test UpdateGuildOnboardingRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_scheduled_event_request.py b/test/test_update_guild_scheduled_event_request.py new file mode 100644 index 0000000..4a314d9 --- /dev/null +++ b/test/test_update_guild_scheduled_event_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_scheduled_event_request import UpdateGuildScheduledEventRequest + +class TestUpdateGuildScheduledEventRequest(unittest.TestCase): + """UpdateGuildScheduledEventRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildScheduledEventRequest: + """Test UpdateGuildScheduledEventRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildScheduledEventRequest` + """ + model = UpdateGuildScheduledEventRequest() + if include_optional: + return UpdateGuildScheduledEventRequest( + status = 56, + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + entity_type = 56, + privacy_level = None, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return UpdateGuildScheduledEventRequest( + ) + """ + + def testUpdateGuildScheduledEventRequest(self): + """Test UpdateGuildScheduledEventRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_sticker_request.py b/test/test_update_guild_sticker_request.py new file mode 100644 index 0000000..8a27bfe --- /dev/null +++ b/test/test_update_guild_sticker_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_sticker_request import UpdateGuildStickerRequest + +class TestUpdateGuildStickerRequest(unittest.TestCase): + """UpdateGuildStickerRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildStickerRequest: + """Test UpdateGuildStickerRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildStickerRequest` + """ + model = UpdateGuildStickerRequest() + if include_optional: + return UpdateGuildStickerRequest( + name = '01', + tags = '0', + description = '' + ) + else: + return UpdateGuildStickerRequest( + ) + """ + + def testUpdateGuildStickerRequest(self): + """Test UpdateGuildStickerRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_template_request.py b/test/test_update_guild_template_request.py new file mode 100644 index 0000000..e56780b --- /dev/null +++ b/test/test_update_guild_template_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_template_request import UpdateGuildTemplateRequest + +class TestUpdateGuildTemplateRequest(unittest.TestCase): + """UpdateGuildTemplateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildTemplateRequest: + """Test UpdateGuildTemplateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildTemplateRequest` + """ + model = UpdateGuildTemplateRequest() + if include_optional: + return UpdateGuildTemplateRequest( + name = '0', + description = '' + ) + else: + return UpdateGuildTemplateRequest( + ) + """ + + def testUpdateGuildTemplateRequest(self): + """Test UpdateGuildTemplateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_guild_widget_settings_request.py b/test/test_update_guild_widget_settings_request.py new file mode 100644 index 0000000..b4038f9 --- /dev/null +++ b/test/test_update_guild_widget_settings_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_guild_widget_settings_request import UpdateGuildWidgetSettingsRequest + +class TestUpdateGuildWidgetSettingsRequest(unittest.TestCase): + """UpdateGuildWidgetSettingsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateGuildWidgetSettingsRequest: + """Test UpdateGuildWidgetSettingsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateGuildWidgetSettingsRequest` + """ + model = UpdateGuildWidgetSettingsRequest() + if include_optional: + return UpdateGuildWidgetSettingsRequest( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + enabled = True + ) + else: + return UpdateGuildWidgetSettingsRequest( + ) + """ + + def testUpdateGuildWidgetSettingsRequest(self): + """Test UpdateGuildWidgetSettingsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_message_interaction_callback_request.py b/test/test_update_message_interaction_callback_request.py new file mode 100644 index 0000000..50cdc82 --- /dev/null +++ b/test/test_update_message_interaction_callback_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_message_interaction_callback_request import UpdateMessageInteractionCallbackRequest + +class TestUpdateMessageInteractionCallbackRequest(unittest.TestCase): + """UpdateMessageInteractionCallbackRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateMessageInteractionCallbackRequest: + """Test UpdateMessageInteractionCallbackRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateMessageInteractionCallbackRequest` + """ + model = UpdateMessageInteractionCallbackRequest() + if include_optional: + return UpdateMessageInteractionCallbackRequest( + type = 56, + data = dc_rest.models.incoming_webhook_update_for_interaction_callback_request_partial.IncomingWebhookUpdateForInteractionCallbackRequestPartial( + content = '', + embeds = [ + dc_rest.models.rich_embed.RichEmbed( + type = '', + url = '', + title = '', + color = 0, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + description = '', + author = dc_rest.models.rich_embed_author.RichEmbedAuthor( + name = '', + url = '', + icon_url = '', ), + image = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + thumbnail = dc_rest.models.rich_embed_image.RichEmbedImage( + url = '', + width = 56, + height = 56, + placeholder = '', + placeholder_version = 0, + is_animated = True, + description = '', ), + footer = dc_rest.models.rich_embed_footer.RichEmbedFooter( + text = '', + icon_url = '', ), + fields = [ + dc_rest.models.rich_embed_field.RichEmbedField( + name = '', + value = '', + inline = True, ) + ], + provider = dc_rest.models.rich_embed_provider.RichEmbedProvider( + name = '', + url = '', ), + video = , ) + ], + allowed_mentions = dc_rest.models.message_allowed_mentions_request.MessageAllowedMentionsRequest( + parse = [ + '' + ], + users = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + replied_user = True, ), + components = [ + null + ], + attachments = [ + dc_rest.models.message_attachment_request.MessageAttachmentRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + description = '', + duration_secs = 0, + waveform = '', + title = '', + is_remix = True, ) + ], + flags = 56, ) + ) + else: + return UpdateMessageInteractionCallbackRequest( + type = 56, + ) + """ + + def testUpdateMessageInteractionCallbackRequest(self): + """Test UpdateMessageInteractionCallbackRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_message_interaction_callback_response.py b/test/test_update_message_interaction_callback_response.py new file mode 100644 index 0000000..7934085 --- /dev/null +++ b/test/test_update_message_interaction_callback_response.py @@ -0,0 +1,848 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_message_interaction_callback_response import UpdateMessageInteractionCallbackResponse + +class TestUpdateMessageInteractionCallbackResponse(unittest.TestCase): + """UpdateMessageInteractionCallbackResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateMessageInteractionCallbackResponse: + """Test UpdateMessageInteractionCallbackResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateMessageInteractionCallbackResponse` + """ + model = UpdateMessageInteractionCallbackResponse() + if include_optional: + return UpdateMessageInteractionCallbackResponse( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ) + ) + else: + return UpdateMessageInteractionCallbackResponse( + type = 56, + message = dc_rest.models.message_response.MessageResponse( + type = 56, + content = '', + mentions = [ + dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ) + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + width = 56, + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + application = dc_rest.models.application_response.ApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + bot = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + slug = '', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rpc_origins = [ + '' + ], + bot_public = True, + bot_require_code_grant = True, + terms_of_service_url = '', + privacy_policy_url = '', + custom_install_url = '', + install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), + integration_types_config = { + 'key' : dc_rest.models.application_integration_type_configuration_response.ApplicationIntegrationTypeConfigurationResponse( + oauth2_install_params = dc_rest.models.application_o_auth2_install_params_response.ApplicationOAuth2InstallParamsResponse( + scopes = [ + 'applications.commands' + ], + permissions = '', ), ) + }, + verify_key = '', + flags = 56, + max_participants = 56, + tags = [ + '' + ], ), + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + clip_participants = [ + + ], ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + fields = [ + dc_rest.models.message_embed_field_response.MessageEmbedFieldResponse( + name = '', + value = '', + inline = True, ) + ], + author = dc_rest.models.message_embed_author_response.MessageEmbedAuthorResponse( + name = '', + url = '', + icon_url = '', + proxy_icon_url = '', ), + provider = dc_rest.models.message_embed_provider_response.MessageEmbedProviderResponse( + name = '', + url = '', ), + image = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + width = 0, + height = 0, + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + thumbnail = dc_rest.models.message_embed_image_response.MessageEmbedImageResponse( + url = '', + proxy_url = '', + height = , + content_type = '', + placeholder = '', + placeholder_version = , + description = '', ), + video = , + footer = dc_rest.models.message_embed_footer_response.MessageEmbedFooterResponse( + text = '', + icon_url = '', + proxy_icon_url = '', ), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], + resolved = dc_rest.models.resolved_objects_response.ResolvedObjectsResponse( + users = { + 'key' : + }, + members = { + 'key' : dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = , + mute = True, + deaf = True, ) + }, + channels = { + 'key' : null + }, + roles = { + 'key' : dc_rest.models.guild_role_response.GuildRoleResponse( + id = , + name = '', + description = '', + permissions = '', + position = 56, + color = 56, + hoist = True, + managed = True, + mentionable = True, + icon = '', + unicode_emoji = '', ) + }, ), + stickers = [ + null + ], + sticker_items = [ + dc_rest.models.message_sticker_item_response.MessageStickerItemResponse( + id = , + name = '', + format_type = 56, ) + ], + id = , + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + call = dc_rest.models.message_call_response.MessageCallResponse( + ended_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + participants = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ), + activity = dc_rest.models.confetti_potion.confetti_potion(), + application = dc_rest.models.basic_application_response.BasicApplicationResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + icon = '', + description = '', + cover_image = '', + primary_sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + application_id = '9072888001528021798096225500850762068629339333975650685139102691291', + interaction = dc_rest.models.message_interaction_response.MessageInteractionResponse( + id = , + type = 56, + name = '', + name_localized = '', ), + nonce = null, + webhook_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_reference = dc_rest.models.message_reference_response.MessageReferenceResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + thread = dc_rest.models.thread_response.ThreadResponse( + id = , + type = 10, + last_message_id = '9072888001528021798096225500850762068629339333975650685139102691291', + flags = 56, + last_pin_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + guild_id = , + name = '', + parent_id = '9072888001528021798096225500850762068629339333975650685139102691291', + rate_limit_per_user = 56, + bitrate = 56, + user_limit = 56, + rtc_region = '', + video_quality_mode = 56, + permissions = '', + owner_id = , + thread_metadata = dc_rest.models.thread_metadata_response.ThreadMetadataResponse( + archived = True, + archive_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + auto_archive_duration = 56, + locked = True, + create_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + invitable = True, ), + message_count = 56, + member_count = 56, + total_message_sent = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + member = dc_rest.models.thread_member_response.ThreadMemberResponse( + id = , + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + join_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, ), ), + mention_channels = [ + dc_rest.models.message_mention_channel_response.MessageMentionChannelResponse( + id = , + name = '', + type = 56, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + role_subscription_data = dc_rest.models.message_role_subscription_data_response.MessageRoleSubscriptionDataResponse( + role_subscription_listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + tier_name = '', + total_months_subscribed = 56, + is_renewal = True, ), + purchase_notification = dc_rest.models.purchase_notification_response.PurchaseNotificationResponse( + type = 56, + guild_product_purchase = dc_rest.models.guild_product_purchase_response.GuildProductPurchaseResponse( + listing_id = '9072888001528021798096225500850762068629339333975650685139102691291', + product_name = '', ), ), + position = 56, + poll = dc_rest.models.poll_response.PollResponse( + question = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), ), + answers = [ + dc_rest.models.poll_answer_response.PollAnswerResponse( + answer_id = 56, + poll_media = dc_rest.models.poll_media_response.PollMediaResponse( + text = '', ), ) + ], + expiry = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + allow_multiselect = True, + layout_type = 56, + results = dc_rest.models.poll_results_response.PollResultsResponse( + answer_counts = [ + dc_rest.models.poll_results_entry_response.PollResultsEntryResponse( + id = 56, + count = 56, + me_voted = True, ) + ], + is_finalized = True, ), ), + interaction_metadata = null, + message_snapshots = [ + dc_rest.models.message_snapshot_response.MessageSnapshotResponse( + message = dc_rest.models.minimal_content_message_response.MinimalContentMessageResponse( + type = 56, + content = '', + mentions = [ + + ], + mention_roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + attachments = [ + dc_rest.models.attachment_response.AttachmentResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + filename = '', + size = 56, + url = '', + proxy_url = '', + height = 56, + duration_secs = 1.337, + waveform = '', + description = '', + content_type = '', + ephemeral = True, + title = '', + clip_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + embeds = [ + dc_rest.models.message_embed_response.MessageEmbedResponse( + type = '', + url = '', + title = '', + description = '', + color = 56, + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = [ + null + ], ), ) + ], + reactions = [ + dc_rest.models.message_reaction_response.MessageReactionResponse( + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + count = 56, + count_details = dc_rest.models.message_reaction_count_details_response.MessageReactionCountDetailsResponse( + burst = 56, + normal = 56, ), + burst_colors = [ + '' + ], + me_burst = True, + me = True, ) + ], + referenced_message = dc_rest.models.basic_message_response.BasicMessageResponse( + type = 56, + content = '', + mentions = , + mention_roles = , + attachments = , + embeds = , + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + edited_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + components = , + id = '9072888001528021798096225500850762068629339333975650685139102691291', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + author = , + pinned = True, + mention_everyone = True, + tts = True, + position = 56, ), ), + ) + """ + + def testUpdateMessageInteractionCallbackResponse(self): + """Test UpdateMessageInteractionCallbackResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_my_guild_member_request.py b/test/test_update_my_guild_member_request.py new file mode 100644 index 0000000..e3044ee --- /dev/null +++ b/test/test_update_my_guild_member_request.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_my_guild_member_request import UpdateMyGuildMemberRequest + +class TestUpdateMyGuildMemberRequest(unittest.TestCase): + """UpdateMyGuildMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateMyGuildMemberRequest: + """Test UpdateMyGuildMemberRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateMyGuildMemberRequest` + """ + model = UpdateMyGuildMemberRequest() + if include_optional: + return UpdateMyGuildMemberRequest( + nick = '' + ) + else: + return UpdateMyGuildMemberRequest( + ) + """ + + def testUpdateMyGuildMemberRequest(self): + """Test UpdateMyGuildMemberRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_onboarding_prompt_request.py b/test/test_update_onboarding_prompt_request.py new file mode 100644 index 0000000..1fa0c7d --- /dev/null +++ b/test/test_update_onboarding_prompt_request.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_onboarding_prompt_request import UpdateOnboardingPromptRequest + +class TestUpdateOnboardingPromptRequest(unittest.TestCase): + """UpdateOnboardingPromptRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateOnboardingPromptRequest: + """Test UpdateOnboardingPromptRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateOnboardingPromptRequest` + """ + model = UpdateOnboardingPromptRequest() + if include_optional: + return UpdateOnboardingPromptRequest( + title = '0', + options = [ + dc_rest.models.onboarding_prompt_option_request.OnboardingPromptOptionRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '0', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + emoji_animated = True, + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UpdateOnboardingPromptRequest( + title = '0', + options = [ + dc_rest.models.onboarding_prompt_option_request.OnboardingPromptOptionRequest( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '0', + description = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + emoji_animated = True, + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testUpdateOnboardingPromptRequest(self): + """Test UpdateOnboardingPromptRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_self_voice_state_request.py b/test/test_update_self_voice_state_request.py new file mode 100644 index 0000000..4b97d66 --- /dev/null +++ b/test/test_update_self_voice_state_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_self_voice_state_request import UpdateSelfVoiceStateRequest + +class TestUpdateSelfVoiceStateRequest(unittest.TestCase): + """UpdateSelfVoiceStateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateSelfVoiceStateRequest: + """Test UpdateSelfVoiceStateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateSelfVoiceStateRequest` + """ + model = UpdateSelfVoiceStateRequest() + if include_optional: + return UpdateSelfVoiceStateRequest( + request_to_speak_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + suppress = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UpdateSelfVoiceStateRequest( + ) + """ + + def testUpdateSelfVoiceStateRequest(self): + """Test UpdateSelfVoiceStateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_stage_instance_request.py b/test/test_update_stage_instance_request.py new file mode 100644 index 0000000..4444187 --- /dev/null +++ b/test/test_update_stage_instance_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_stage_instance_request import UpdateStageInstanceRequest + +class TestUpdateStageInstanceRequest(unittest.TestCase): + """UpdateStageInstanceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateStageInstanceRequest: + """Test UpdateStageInstanceRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateStageInstanceRequest` + """ + model = UpdateStageInstanceRequest() + if include_optional: + return UpdateStageInstanceRequest( + topic = '0', + privacy_level = 56 + ) + else: + return UpdateStageInstanceRequest( + ) + """ + + def testUpdateStageInstanceRequest(self): + """Test UpdateStageInstanceRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_thread_request_partial.py b/test/test_update_thread_request_partial.py new file mode 100644 index 0000000..9d19aaa --- /dev/null +++ b/test/test_update_thread_request_partial.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_thread_request_partial import UpdateThreadRequestPartial + +class TestUpdateThreadRequestPartial(unittest.TestCase): + """UpdateThreadRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateThreadRequestPartial: + """Test UpdateThreadRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateThreadRequestPartial` + """ + model = UpdateThreadRequestPartial() + if include_optional: + return UpdateThreadRequestPartial( + name = '', + archived = True, + locked = True, + invitable = True, + auto_archive_duration = 56, + rate_limit_per_user = 0, + flags = 56, + applied_tags = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + bitrate = 8000, + user_limit = 0, + rtc_region = '', + video_quality_mode = 56 + ) + else: + return UpdateThreadRequestPartial( + ) + """ + + def testUpdateThreadRequestPartial(self): + """Test UpdateThreadRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_thread_tag_request.py b/test/test_update_thread_tag_request.py new file mode 100644 index 0000000..e0006f5 --- /dev/null +++ b/test/test_update_thread_tag_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_thread_tag_request import UpdateThreadTagRequest + +class TestUpdateThreadTagRequest(unittest.TestCase): + """UpdateThreadTagRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateThreadTagRequest: + """Test UpdateThreadTagRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateThreadTagRequest` + """ + model = UpdateThreadTagRequest() + if include_optional: + return UpdateThreadTagRequest( + name = '', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', + moderated = True, + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UpdateThreadTagRequest( + name = '', + ) + """ + + def testUpdateThreadTagRequest(self): + """Test UpdateThreadTagRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_voice_state_request.py b/test/test_update_voice_state_request.py new file mode 100644 index 0000000..83b37f2 --- /dev/null +++ b/test/test_update_voice_state_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_voice_state_request import UpdateVoiceStateRequest + +class TestUpdateVoiceStateRequest(unittest.TestCase): + """UpdateVoiceStateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateVoiceStateRequest: + """Test UpdateVoiceStateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateVoiceStateRequest` + """ + model = UpdateVoiceStateRequest() + if include_optional: + return UpdateVoiceStateRequest( + suppress = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UpdateVoiceStateRequest( + ) + """ + + def testUpdateVoiceStateRequest(self): + """Test UpdateVoiceStateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_webhook_by_token_request.py b/test/test_update_webhook_by_token_request.py new file mode 100644 index 0000000..7713118 --- /dev/null +++ b/test/test_update_webhook_by_token_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_webhook_by_token_request import UpdateWebhookByTokenRequest + +class TestUpdateWebhookByTokenRequest(unittest.TestCase): + """UpdateWebhookByTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateWebhookByTokenRequest: + """Test UpdateWebhookByTokenRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateWebhookByTokenRequest` + """ + model = UpdateWebhookByTokenRequest() + if include_optional: + return UpdateWebhookByTokenRequest( + name = '0', + avatar = '' + ) + else: + return UpdateWebhookByTokenRequest( + ) + """ + + def testUpdateWebhookByTokenRequest(self): + """Test UpdateWebhookByTokenRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_webhook_request.py b/test/test_update_webhook_request.py new file mode 100644 index 0000000..d981dbf --- /dev/null +++ b/test/test_update_webhook_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.update_webhook_request import UpdateWebhookRequest + +class TestUpdateWebhookRequest(unittest.TestCase): + """UpdateWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateWebhookRequest: + """Test UpdateWebhookRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateWebhookRequest` + """ + model = UpdateWebhookRequest() + if include_optional: + return UpdateWebhookRequest( + name = '0', + avatar = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UpdateWebhookRequest( + ) + """ + + def testUpdateWebhookRequest(self): + """Test UpdateWebhookRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_avatar_decoration_response.py b/test/test_user_avatar_decoration_response.py new file mode 100644 index 0000000..be620e4 --- /dev/null +++ b/test/test_user_avatar_decoration_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_avatar_decoration_response import UserAvatarDecorationResponse + +class TestUserAvatarDecorationResponse(unittest.TestCase): + """UserAvatarDecorationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAvatarDecorationResponse: + """Test UserAvatarDecorationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAvatarDecorationResponse` + """ + model = UserAvatarDecorationResponse() + if include_optional: + return UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UserAvatarDecorationResponse( + asset = '', + ) + """ + + def testUserAvatarDecorationResponse(self): + """Test UserAvatarDecorationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_collectibles_response.py b/test/test_user_collectibles_response.py new file mode 100644 index 0000000..febd09c --- /dev/null +++ b/test/test_user_collectibles_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_collectibles_response import UserCollectiblesResponse + +class TestUserCollectiblesResponse(unittest.TestCase): + """UserCollectiblesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCollectiblesResponse: + """Test UserCollectiblesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCollectiblesResponse` + """ + model = UserCollectiblesResponse() + if include_optional: + return UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ) + ) + else: + return UserCollectiblesResponse( + ) + """ + + def testUserCollectiblesResponse(self): + """Test UserCollectiblesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_communication_disabled_action.py b/test/test_user_communication_disabled_action.py new file mode 100644 index 0000000..39d9b90 --- /dev/null +++ b/test/test_user_communication_disabled_action.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_communication_disabled_action import UserCommunicationDisabledAction + +class TestUserCommunicationDisabledAction(unittest.TestCase): + """UserCommunicationDisabledAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCommunicationDisabledAction: + """Test UserCommunicationDisabledAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCommunicationDisabledAction` + """ + model = UserCommunicationDisabledAction() + if include_optional: + return UserCommunicationDisabledAction( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata.UserCommunicationDisabledActionMetadata( + duration_seconds = 0, ) + ) + else: + return UserCommunicationDisabledAction( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata.UserCommunicationDisabledActionMetadata( + duration_seconds = 0, ), + ) + """ + + def testUserCommunicationDisabledAction(self): + """Test UserCommunicationDisabledAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_communication_disabled_action_metadata.py b/test/test_user_communication_disabled_action_metadata.py new file mode 100644 index 0000000..a52f917 --- /dev/null +++ b/test/test_user_communication_disabled_action_metadata.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_communication_disabled_action_metadata import UserCommunicationDisabledActionMetadata + +class TestUserCommunicationDisabledActionMetadata(unittest.TestCase): + """UserCommunicationDisabledActionMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCommunicationDisabledActionMetadata: + """Test UserCommunicationDisabledActionMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCommunicationDisabledActionMetadata` + """ + model = UserCommunicationDisabledActionMetadata() + if include_optional: + return UserCommunicationDisabledActionMetadata( + duration_seconds = 0 + ) + else: + return UserCommunicationDisabledActionMetadata( + ) + """ + + def testUserCommunicationDisabledActionMetadata(self): + """Test UserCommunicationDisabledActionMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_communication_disabled_action_metadata_response.py b/test/test_user_communication_disabled_action_metadata_response.py new file mode 100644 index 0000000..30cd243 --- /dev/null +++ b/test/test_user_communication_disabled_action_metadata_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_communication_disabled_action_metadata_response import UserCommunicationDisabledActionMetadataResponse + +class TestUserCommunicationDisabledActionMetadataResponse(unittest.TestCase): + """UserCommunicationDisabledActionMetadataResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCommunicationDisabledActionMetadataResponse: + """Test UserCommunicationDisabledActionMetadataResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCommunicationDisabledActionMetadataResponse` + """ + model = UserCommunicationDisabledActionMetadataResponse() + if include_optional: + return UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56 + ) + else: + return UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56, + ) + """ + + def testUserCommunicationDisabledActionMetadataResponse(self): + """Test UserCommunicationDisabledActionMetadataResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_communication_disabled_action_response.py b/test/test_user_communication_disabled_action_response.py new file mode 100644 index 0000000..5d3b191 --- /dev/null +++ b/test/test_user_communication_disabled_action_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_communication_disabled_action_response import UserCommunicationDisabledActionResponse + +class TestUserCommunicationDisabledActionResponse(unittest.TestCase): + """UserCommunicationDisabledActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCommunicationDisabledActionResponse: + """Test UserCommunicationDisabledActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCommunicationDisabledActionResponse` + """ + model = UserCommunicationDisabledActionResponse() + if include_optional: + return UserCommunicationDisabledActionResponse( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata_response.UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56, ) + ) + else: + return UserCommunicationDisabledActionResponse( + type = 56, + metadata = dc_rest.models.user_communication_disabled_action_metadata_response.UserCommunicationDisabledActionMetadataResponse( + duration_seconds = 56, ), + ) + """ + + def testUserCommunicationDisabledActionResponse(self): + """Test UserCommunicationDisabledActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_guild_onboarding_response.py b/test/test_user_guild_onboarding_response.py new file mode 100644 index 0000000..3540c4c --- /dev/null +++ b/test/test_user_guild_onboarding_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_guild_onboarding_response import UserGuildOnboardingResponse + +class TestUserGuildOnboardingResponse(unittest.TestCase): + """UserGuildOnboardingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserGuildOnboardingResponse: + """Test UserGuildOnboardingResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserGuildOnboardingResponse` + """ + model = UserGuildOnboardingResponse() + if include_optional: + return UserGuildOnboardingResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + prompts = [ + dc_rest.models.onboarding_prompt_response.OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, ) + ], + default_channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + enabled = True + ) + else: + return UserGuildOnboardingResponse( + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + prompts = [ + dc_rest.models.onboarding_prompt_response.OnboardingPromptResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + options = [ + dc_rest.models.onboarding_prompt_option_response.OnboardingPromptOptionResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + title = '', + description = '', + emoji = dc_rest.models.message_reaction_emoji_response.MessageReactionEmojiResponse( + name = '', + animated = True, ), + role_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], ) + ], + single_select = True, + required = True, + in_onboarding = True, + type = 56, ) + ], + default_channel_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + enabled = True, + ) + """ + + def testUserGuildOnboardingResponse(self): + """Test UserGuildOnboardingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_nameplate_response.py b/test/test_user_nameplate_response.py new file mode 100644 index 0000000..3f9cd15 --- /dev/null +++ b/test/test_user_nameplate_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_nameplate_response import UserNameplateResponse + +class TestUserNameplateResponse(unittest.TestCase): + """UserNameplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserNameplateResponse: + """Test UserNameplateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserNameplateResponse` + """ + model = UserNameplateResponse() + if include_optional: + return UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '' + ) + else: + return UserNameplateResponse( + ) + """ + + def testUserNameplateResponse(self): + """Test UserNameplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_pii_response.py b/test/test_user_pii_response.py new file mode 100644 index 0000000..8aa621b --- /dev/null +++ b/test/test_user_pii_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_pii_response import UserPIIResponse + +class TestUserPIIResponse(unittest.TestCase): + """UserPIIResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserPIIResponse: + """Test UserPIIResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserPIIResponse` + """ + model = UserPIIResponse() + if include_optional: + return UserPIIResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), + mfa_enabled = True, + locale = '', + premium_type = 56, + email = '', + verified = True + ) + else: + return UserPIIResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + mfa_enabled = True, + locale = '', + ) + """ + + def testUserPIIResponse(self): + """Test UserPIIResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_primary_guild_response.py b/test/test_user_primary_guild_response.py new file mode 100644 index 0000000..e464d04 --- /dev/null +++ b/test/test_user_primary_guild_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_primary_guild_response import UserPrimaryGuildResponse + +class TestUserPrimaryGuildResponse(unittest.TestCase): + """UserPrimaryGuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserPrimaryGuildResponse: + """Test UserPrimaryGuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserPrimaryGuildResponse` + """ + model = UserPrimaryGuildResponse() + if include_optional: + return UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '' + ) + else: + return UserPrimaryGuildResponse( + ) + """ + + def testUserPrimaryGuildResponse(self): + """Test UserPrimaryGuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_response.py b/test/test_user_response.py new file mode 100644 index 0000000..2404e6f --- /dev/null +++ b/test/test_user_response.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_response import UserResponse + +class TestUserResponse(unittest.TestCase): + """UserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserResponse: + """Test UserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserResponse` + """ + model = UserResponse() + if include_optional: + return UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ) + ) + else: + return UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + ) + """ + + def testUserResponse(self): + """Test UserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_select_component_for_message_request.py b/test/test_user_select_component_for_message_request.py new file mode 100644 index 0000000..aebafc7 --- /dev/null +++ b/test/test_user_select_component_for_message_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_select_component_for_message_request import UserSelectComponentForMessageRequest + +class TestUserSelectComponentForMessageRequest(unittest.TestCase): + """UserSelectComponentForMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserSelectComponentForMessageRequest: + """Test UserSelectComponentForMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSelectComponentForMessageRequest` + """ + model = UserSelectComponentForMessageRequest() + if include_optional: + return UserSelectComponentForMessageRequest( + type = 56, + custom_id = '', + placeholder = '', + min_values = 0, + max_values = 1, + disabled = True, + default_values = [ + dc_rest.models.user_select_default_value.UserSelectDefaultValue( + type = 'user', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return UserSelectComponentForMessageRequest( + type = 56, + custom_id = '', + ) + """ + + def testUserSelectComponentForMessageRequest(self): + """Test UserSelectComponentForMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_select_component_response.py b/test/test_user_select_component_response.py new file mode 100644 index 0000000..a50e79a --- /dev/null +++ b/test/test_user_select_component_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_select_component_response import UserSelectComponentResponse + +class TestUserSelectComponentResponse(unittest.TestCase): + """UserSelectComponentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserSelectComponentResponse: + """Test UserSelectComponentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSelectComponentResponse` + """ + model = UserSelectComponentResponse() + if include_optional: + return UserSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + placeholder = '', + min_values = 56, + max_values = 56, + disabled = True, + default_values = [ + dc_rest.models.user_select_default_value.UserSelectDefaultValue( + type = 'user', + id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ] + ) + else: + return UserSelectComponentResponse( + type = 56, + id = 56, + custom_id = '', + ) + """ + + def testUserSelectComponentResponse(self): + """Test UserSelectComponentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_select_default_value.py b/test/test_user_select_default_value.py new file mode 100644 index 0000000..d748926 --- /dev/null +++ b/test/test_user_select_default_value.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_select_default_value import UserSelectDefaultValue + +class TestUserSelectDefaultValue(unittest.TestCase): + """UserSelectDefaultValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserSelectDefaultValue: + """Test UserSelectDefaultValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSelectDefaultValue` + """ + model = UserSelectDefaultValue() + if include_optional: + return UserSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UserSelectDefaultValue( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testUserSelectDefaultValue(self): + """Test UserSelectDefaultValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_select_default_value_response.py b/test/test_user_select_default_value_response.py new file mode 100644 index 0000000..75b2861 --- /dev/null +++ b/test/test_user_select_default_value_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.user_select_default_value_response import UserSelectDefaultValueResponse + +class TestUserSelectDefaultValueResponse(unittest.TestCase): + """UserSelectDefaultValueResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserSelectDefaultValueResponse: + """Test UserSelectDefaultValueResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSelectDefaultValueResponse` + """ + model = UserSelectDefaultValueResponse() + if include_optional: + return UserSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return UserSelectDefaultValueResponse( + type = '', + id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testUserSelectDefaultValueResponse(self): + """Test UserSelectDefaultValueResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vanity_url_error_response.py b/test/test_vanity_url_error_response.py new file mode 100644 index 0000000..9145f65 --- /dev/null +++ b/test/test_vanity_url_error_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.vanity_url_error_response import VanityURLErrorResponse + +class TestVanityURLErrorResponse(unittest.TestCase): + """VanityURLErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VanityURLErrorResponse: + """Test VanityURLErrorResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VanityURLErrorResponse` + """ + model = VanityURLErrorResponse() + if include_optional: + return VanityURLErrorResponse( + message = '', + code = 56 + ) + else: + return VanityURLErrorResponse( + message = '', + code = 56, + ) + """ + + def testVanityURLErrorResponse(self): + """Test VanityURLErrorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vanity_url_response.py b/test/test_vanity_url_response.py new file mode 100644 index 0000000..92788fe --- /dev/null +++ b/test/test_vanity_url_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.vanity_url_response import VanityURLResponse + +class TestVanityURLResponse(unittest.TestCase): + """VanityURLResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VanityURLResponse: + """Test VanityURLResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VanityURLResponse` + """ + model = VanityURLResponse() + if include_optional: + return VanityURLResponse( + code = '', + uses = 56, + error = dc_rest.models.vanity_url_error_response.VanityURLErrorResponse( + message = '', + code = 56, ) + ) + else: + return VanityURLResponse( + uses = 56, + ) + """ + + def testVanityURLResponse(self): + """Test VanityURLResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_voice_region_response.py b/test/test_voice_region_response.py new file mode 100644 index 0000000..a59dd87 --- /dev/null +++ b/test/test_voice_region_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.voice_region_response import VoiceRegionResponse + +class TestVoiceRegionResponse(unittest.TestCase): + """VoiceRegionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceRegionResponse: + """Test VoiceRegionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceRegionResponse` + """ + model = VoiceRegionResponse() + if include_optional: + return VoiceRegionResponse( + id = '', + name = '', + custom = True, + deprecated = True, + optimal = True + ) + else: + return VoiceRegionResponse( + id = '', + name = '', + custom = True, + deprecated = True, + optimal = True, + ) + """ + + def testVoiceRegionResponse(self): + """Test VoiceRegionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_voice_scheduled_event_create_request.py b/test/test_voice_scheduled_event_create_request.py new file mode 100644 index 0000000..ccba1e3 --- /dev/null +++ b/test/test_voice_scheduled_event_create_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.voice_scheduled_event_create_request import VoiceScheduledEventCreateRequest + +class TestVoiceScheduledEventCreateRequest(unittest.TestCase): + """VoiceScheduledEventCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceScheduledEventCreateRequest: + """Test VoiceScheduledEventCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceScheduledEventCreateRequest` + """ + model = VoiceScheduledEventCreateRequest() + if include_optional: + return VoiceScheduledEventCreateRequest( + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return VoiceScheduledEventCreateRequest( + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + privacy_level = None, + entity_type = 56, + ) + """ + + def testVoiceScheduledEventCreateRequest(self): + """Test VoiceScheduledEventCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_voice_scheduled_event_patch_request_partial.py b/test/test_voice_scheduled_event_patch_request_partial.py new file mode 100644 index 0000000..a66e131 --- /dev/null +++ b/test/test_voice_scheduled_event_patch_request_partial.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.voice_scheduled_event_patch_request_partial import VoiceScheduledEventPatchRequestPartial + +class TestVoiceScheduledEventPatchRequestPartial(unittest.TestCase): + """VoiceScheduledEventPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceScheduledEventPatchRequestPartial: + """Test VoiceScheduledEventPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceScheduledEventPatchRequestPartial` + """ + model = VoiceScheduledEventPatchRequestPartial() + if include_optional: + return VoiceScheduledEventPatchRequestPartial( + status = 56, + name = '', + description = '', + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + entity_type = 56, + privacy_level = None, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return VoiceScheduledEventPatchRequestPartial( + ) + """ + + def testVoiceScheduledEventPatchRequestPartial(self): + """Test VoiceScheduledEventPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_voice_scheduled_event_response.py b/test/test_voice_scheduled_event_response.py new file mode 100644 index 0000000..06b1149 --- /dev/null +++ b/test/test_voice_scheduled_event_response.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.voice_scheduled_event_response import VoiceScheduledEventResponse + +class TestVoiceScheduledEventResponse(unittest.TestCase): + """VoiceScheduledEventResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceScheduledEventResponse: + """Test VoiceScheduledEventResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceScheduledEventResponse` + """ + model = VoiceScheduledEventResponse() + if include_optional: + return VoiceScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + description = '', + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator_id = '9072888001528021798096225500850762068629339333975650685139102691291', + creator = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + image = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + entity_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_count = 56, + privacy_level = None, + user_rsvp = dc_rest.models.scheduled_event_user_response.ScheduledEventUserResponse( + guild_scheduled_event_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', ), + mute = True, + deaf = True, ), ), + entity_metadata = dc_rest.models.confetti_potion.confetti_potion() + ) + else: + return VoiceScheduledEventResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + scheduled_start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 56, + entity_type = 56, + privacy_level = None, + ) + """ + + def testVoiceScheduledEventResponse(self): + """Test VoiceScheduledEventResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_voice_state_response.py b/test/test_voice_state_response.py new file mode 100644 index 0000000..595cbff --- /dev/null +++ b/test/test_voice_state_response.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.voice_state_response import VoiceStateResponse + +class TestVoiceStateResponse(unittest.TestCase): + """VoiceStateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceStateResponse: + """Test VoiceStateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceStateResponse` + """ + model = VoiceStateResponse() + if include_optional: + return VoiceStateResponse( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + deaf = True, + guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + member = dc_rest.models.guild_member_response.GuildMemberResponse( + avatar = '', + avatar_decoration_data = dc_rest.models.user_avatar_decoration_response.UserAvatarDecorationResponse( + asset = '', + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', ), + banner = '', + communication_disabled_until = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flags = 56, + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + nick = '', + pending = True, + premium_since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + roles = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + user = dc_rest.models.user_response.UserResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + username = '', + avatar = '', + discriminator = '', + public_flags = 56, + flags = -9007199254740991, + bot = True, + system = True, + banner = '', + accent_color = 56, + global_name = '', + collectibles = dc_rest.models.user_collectibles_response.UserCollectiblesResponse( + nameplate = dc_rest.models.user_nameplate_response.UserNameplateResponse( + sku_id = '9072888001528021798096225500850762068629339333975650685139102691291', + asset = '', + label = '', + palette = '', ), ), + primary_guild = dc_rest.models.user_primary_guild_response.UserPrimaryGuildResponse( + identity_guild_id = '9072888001528021798096225500850762068629339333975650685139102691291', + identity_enabled = True, + tag = '', + badge = '', ), ), + mute = True, + deaf = True, ), + mute = True, + request_to_speak_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + suppress = True, + self_stream = True, + self_deaf = True, + self_mute = True, + self_video = True, + session_id = '', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return VoiceStateResponse( + deaf = True, + mute = True, + suppress = True, + self_deaf = True, + self_mute = True, + self_video = True, + session_id = '', + user_id = '9072888001528021798096225500850762068629339333975650685139102691291', + ) + """ + + def testVoiceStateResponse(self): + """Test VoiceStateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_slack_embed.py b/test/test_webhook_slack_embed.py new file mode 100644 index 0000000..c90379f --- /dev/null +++ b/test/test_webhook_slack_embed.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.webhook_slack_embed import WebhookSlackEmbed + +class TestWebhookSlackEmbed(unittest.TestCase): + """WebhookSlackEmbed unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebhookSlackEmbed: + """Test WebhookSlackEmbed + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebhookSlackEmbed` + """ + model = WebhookSlackEmbed() + if include_optional: + return WebhookSlackEmbed( + title = '', + title_link = '', + text = '', + color = '#2EC', + ts = 56, + pretext = '', + footer = '', + footer_icon = '', + author_name = '', + author_link = '', + author_icon = '', + image_url = '', + thumb_url = '', + fields = [ + dc_rest.models.webhook_slack_embed_field.WebhookSlackEmbedField( + name = '', + value = '', + inline = True, ) + ] + ) + else: + return WebhookSlackEmbed( + ) + """ + + def testWebhookSlackEmbed(self): + """Test WebhookSlackEmbed""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_slack_embed_field.py b/test/test_webhook_slack_embed_field.py new file mode 100644 index 0000000..ce80699 --- /dev/null +++ b/test/test_webhook_slack_embed_field.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.webhook_slack_embed_field import WebhookSlackEmbedField + +class TestWebhookSlackEmbedField(unittest.TestCase): + """WebhookSlackEmbedField unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebhookSlackEmbedField: + """Test WebhookSlackEmbedField + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebhookSlackEmbedField` + """ + model = WebhookSlackEmbedField() + if include_optional: + return WebhookSlackEmbedField( + name = '', + value = '', + inline = True + ) + else: + return WebhookSlackEmbedField( + ) + """ + + def testWebhookSlackEmbedField(self): + """Test WebhookSlackEmbedField""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_source_channel_response.py b/test/test_webhook_source_channel_response.py new file mode 100644 index 0000000..407957d --- /dev/null +++ b/test/test_webhook_source_channel_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.webhook_source_channel_response import WebhookSourceChannelResponse + +class TestWebhookSourceChannelResponse(unittest.TestCase): + """WebhookSourceChannelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebhookSourceChannelResponse: + """Test WebhookSourceChannelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebhookSourceChannelResponse` + """ + model = WebhookSourceChannelResponse() + if include_optional: + return WebhookSourceChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '' + ) + else: + return WebhookSourceChannelResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + ) + """ + + def testWebhookSourceChannelResponse(self): + """Test WebhookSourceChannelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_source_guild_response.py b/test/test_webhook_source_guild_response.py new file mode 100644 index 0000000..3979ff1 --- /dev/null +++ b/test/test_webhook_source_guild_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.webhook_source_guild_response import WebhookSourceGuildResponse + +class TestWebhookSourceGuildResponse(unittest.TestCase): + """WebhookSourceGuildResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebhookSourceGuildResponse: + """Test WebhookSourceGuildResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebhookSourceGuildResponse` + """ + model = WebhookSourceGuildResponse() + if include_optional: + return WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + icon = '', + name = '' + ) + else: + return WebhookSourceGuildResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + ) + """ + + def testWebhookSourceGuildResponse(self): + """Test WebhookSourceGuildResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_welcome_message_response.py b/test/test_welcome_message_response.py new file mode 100644 index 0000000..1ac5649 --- /dev/null +++ b/test/test_welcome_message_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.welcome_message_response import WelcomeMessageResponse + +class TestWelcomeMessageResponse(unittest.TestCase): + """WelcomeMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WelcomeMessageResponse: + """Test WelcomeMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WelcomeMessageResponse` + """ + model = WelcomeMessageResponse() + if include_optional: + return WelcomeMessageResponse( + author_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + message = '' + ) + else: + return WelcomeMessageResponse( + author_ids = [ + '9072888001528021798096225500850762068629339333975650685139102691291' + ], + message = '', + ) + """ + + def testWelcomeMessageResponse(self): + """Test WelcomeMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_welcome_screen_patch_request_partial.py b/test/test_welcome_screen_patch_request_partial.py new file mode 100644 index 0000000..b5c2ad3 --- /dev/null +++ b/test/test_welcome_screen_patch_request_partial.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.welcome_screen_patch_request_partial import WelcomeScreenPatchRequestPartial + +class TestWelcomeScreenPatchRequestPartial(unittest.TestCase): + """WelcomeScreenPatchRequestPartial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WelcomeScreenPatchRequestPartial: + """Test WelcomeScreenPatchRequestPartial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WelcomeScreenPatchRequestPartial` + """ + model = WelcomeScreenPatchRequestPartial() + if include_optional: + return WelcomeScreenPatchRequestPartial( + description = '', + welcome_channels = [ + dc_rest.models.guild_welcome_channel.GuildWelcomeChannel( + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', + description = '0', + emoji_id = '9072888001528021798096225500850762068629339333975650685139102691291', + emoji_name = '', ) + ], + enabled = True + ) + else: + return WelcomeScreenPatchRequestPartial( + ) + """ + + def testWelcomeScreenPatchRequestPartial(self): + """Test WelcomeScreenPatchRequestPartial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_widget_activity.py b/test/test_widget_activity.py new file mode 100644 index 0000000..b372b79 --- /dev/null +++ b/test/test_widget_activity.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.widget_activity import WidgetActivity + +class TestWidgetActivity(unittest.TestCase): + """WidgetActivity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WidgetActivity: + """Test WidgetActivity + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WidgetActivity` + """ + model = WidgetActivity() + if include_optional: + return WidgetActivity( + name = '' + ) + else: + return WidgetActivity( + name = '', + ) + """ + + def testWidgetActivity(self): + """Test WidgetActivity""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_widget_channel.py b/test/test_widget_channel.py new file mode 100644 index 0000000..2d65342 --- /dev/null +++ b/test/test_widget_channel.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.widget_channel import WidgetChannel + +class TestWidgetChannel(unittest.TestCase): + """WidgetChannel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WidgetChannel: + """Test WidgetChannel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WidgetChannel` + """ + model = WidgetChannel() + if include_optional: + return WidgetChannel( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56 + ) + else: + return WidgetChannel( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56, + ) + """ + + def testWidgetChannel(self): + """Test WidgetChannel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_widget_member.py b/test/test_widget_member.py new file mode 100644 index 0000000..f932ff1 --- /dev/null +++ b/test/test_widget_member.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.widget_member import WidgetMember + +class TestWidgetMember(unittest.TestCase): + """WidgetMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WidgetMember: + """Test WidgetMember + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WidgetMember` + """ + model = WidgetMember() + if include_optional: + return WidgetMember( + id = '', + username = '', + discriminator = '', + avatar = None, + status = '', + avatar_url = '', + activity = dc_rest.models.widget_activity.WidgetActivity( + name = '', ), + deaf = True, + mute = True, + self_deaf = True, + self_mute = True, + suppress = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return WidgetMember( + id = '', + username = '', + discriminator = '', + status = '', + avatar_url = '', + ) + """ + + def testWidgetMember(self): + """Test WidgetMember""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_widget_response.py b/test/test_widget_response.py new file mode 100644 index 0000000..58a6761 --- /dev/null +++ b/test/test_widget_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.widget_response import WidgetResponse + +class TestWidgetResponse(unittest.TestCase): + """WidgetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WidgetResponse: + """Test WidgetResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WidgetResponse` + """ + model = WidgetResponse() + if include_optional: + return WidgetResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + instant_invite = '', + channels = [ + dc_rest.models.widget_channel.WidgetChannel( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56, ) + ], + members = [ + dc_rest.models.widget_member.WidgetMember( + id = '', + username = '', + discriminator = '', + avatar = null, + status = '', + avatar_url = '', + activity = dc_rest.models.widget_activity.WidgetActivity( + name = '', ), + deaf = True, + mute = True, + self_deaf = True, + self_mute = True, + suppress = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + presence_count = 56 + ) + else: + return WidgetResponse( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + channels = [ + dc_rest.models.widget_channel.WidgetChannel( + id = '9072888001528021798096225500850762068629339333975650685139102691291', + name = '', + position = 56, ) + ], + members = [ + dc_rest.models.widget_member.WidgetMember( + id = '', + username = '', + discriminator = '', + avatar = null, + status = '', + avatar_url = '', + activity = dc_rest.models.widget_activity.WidgetActivity( + name = '', ), + deaf = True, + mute = True, + self_deaf = True, + self_mute = True, + suppress = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291', ) + ], + presence_count = 56, + ) + """ + + def testWidgetResponse(self): + """Test WidgetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_widget_settings_response.py b/test/test_widget_settings_response.py new file mode 100644 index 0000000..6e8e661 --- /dev/null +++ b/test/test_widget_settings_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" +Discord HTTP API (Preview) - REST API Client +Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. + +## Metadata + +- **Copyright**: Copyright (c) 2025 Qntx +- **Author**: ΣX +- **Version**: 10 +- **Modified**: 2025-07-01T06:33:02.994204459Z[Etc/UTC] +- **Generator Version**: 7.14.0 + +
+⚠️ Important Disclaimer & Limitation of Liability +
+> **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +> to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +> and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +> of this software or its outputs. +> +> This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +> Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +> financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +> legal professionals before making decisions based on this software's outputs. +> +> Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +> other financial activities may result in substantial losses, including total loss of capital. The Developers are not +> liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +> outputs and ensuring their suitability for intended purposes. +> +> This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +> the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +> comply with third-party terms and conditions. +> +> Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +> their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +> Developers disclaim liability for any legal consequences arising from non-compliance. +> +> To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +> consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +> loss of profits, data, or business opportunities. + +
+""" # noqa: E501 + + +import unittest + +from dc_rest.models.widget_settings_response import WidgetSettingsResponse + +class TestWidgetSettingsResponse(unittest.TestCase): + """WidgetSettingsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WidgetSettingsResponse: + """Test WidgetSettingsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WidgetSettingsResponse` + """ + model = WidgetSettingsResponse() + if include_optional: + return WidgetSettingsResponse( + enabled = True, + channel_id = '9072888001528021798096225500850762068629339333975650685139102691291' + ) + else: + return WidgetSettingsResponse( + enabled = True, + ) + """ + + def testWidgetSettingsResponse(self): + """Test WidgetSettingsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b03c655 --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=dc_rest